MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / scrollIntoView

Function scrollIntoView

static/js/codemirror/codemirror.js:2442–2446  ·  view source on GitHub ↗
(cm, x1, y1, x2, y2)

Source from the content-addressed store, hash-verified

2440 }
2441
2442 function scrollIntoView(cm, x1, y1, x2, y2) {
2443 var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
2444 if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
2445 if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
2446 }
2447
2448 function calculateScrollPos(cm, x1, y1, x2, y2) {
2449 var display = cm.display, pt = paddingTop(display);

Callers 1

codemirror.jsFile · 0.85

Calls 3

calculateScrollPosFunction · 0.85
setScrollTopFunction · 0.85
setScrollLeftFunction · 0.85

Tested by

no test coverage detected