MCPcopy Create free account
hub / github.com/FabricMC/Matcher / select

Method select

src/main/java/matcher/gui/tab/WebViewTab.java:53–59  ·  view source on GitHub ↗
(String anchorId)

Source from the content-addressed store, hash-verified

51 }
52
53 protected void select(String anchorId) {
54 addWebViewTask(() -> webView.getEngine().executeScript("var newAnchor = document.getElementById('"+anchorId+"');"
55 + "if (newAnchor !== null) document.body.scrollTop = newAnchor.getBoundingClientRect().top + window.scrollY;"
56 + "if (window.hasOwnProperty('anchorElem') && window.anchorElem !== null) window.anchorElem.classList.remove('selected');"
57 + "if (newAnchor !== null) newAnchor.classList.add('selected');"
58 + "window.anchorElem = newAnchor;"));
59 }
60
61 protected double getScrollTop() {
62 Object result;

Callers 15

onViewChangeMethod · 0.80
updateListsMethod · 0.80
updateClassTreeMethod · 0.80
updateResultsMethod · 0.80
moveSelectionUpMethod · 0.80
moveSelectionDownMethod · 0.80
initMethod · 0.80
initMethod · 0.80
initMethod · 0.80
changedMethod · 0.80
updateMethod · 0.80
onMethodSelectMethod · 0.80

Calls 1

addWebViewTaskMethod · 0.95

Tested by

no test coverage detected