MCPcopy
hub / github.com/csev/py4e / scrollIntoView

Function scrollIntoView

tools/pythonauto/static/codemirrorepl/codemirror.js:3514–3518  ·  view source on GitHub ↗
(cm, x1, y1, x2, y2)

Source from the content-addressed store, hash-verified

3512
3513 // Scroll a given set of coordinates into view (immediately).
3514 function scrollIntoView(cm, x1, y1, x2, y2) {
3515 var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
3516 if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
3517 if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
3518 }
3519
3520 // Calculate a new scroll position needed to scroll the given
3521 // rectangle into view. Returns an object with scrollTop and

Callers 1

codemirror.jsFile · 0.70

Calls 3

calculateScrollPosFunction · 0.70
setScrollTopFunction · 0.70
setScrollLeftFunction · 0.70

Tested by

no test coverage detected