MCPcopy Create free account
hub / github.com/sql-js/sql.js / scrollIntoView

Function scrollIntoView

GUI/codemirror/lib/codemirror.js:3554–3558  ·  view source on GitHub ↗
(cm, x1, y1, x2, y2)

Source from the content-addressed store, hash-verified

3552
3553 // Scroll a given set of coordinates into view (immediately).
3554 function scrollIntoView(cm, x1, y1, x2, y2) {
3555 var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2);
3556 if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop);
3557 if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft);
3558 }
3559
3560 // Calculate a new scroll position needed to scroll the given
3561 // rectangle into view. Returns an object with scrollTop and

Callers 1

codemirror.jsFile · 0.85

Calls 3

calculateScrollPosFunction · 0.85
setScrollTopFunction · 0.85
setScrollLeftFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…