MCPcopy Index your code
hub / github.com/DHTMLX/gantt / scrollIntoView

Function scrollIntoView

samples/common/codehighlight/codemirror.js:3461–3465  ·  view source on GitHub ↗
(cm, rect)

Source from the content-addressed store, hash-verified

3459
3460 // Scroll a given set of coordinates into view (immediately).
3461 function scrollIntoView(cm, rect) {
3462 var scrollPos = calculateScrollPos(cm, rect);
3463 if (scrollPos.scrollTop != null) { updateScrollTop(cm, scrollPos.scrollTop); }
3464 if (scrollPos.scrollLeft != null) { setScrollLeft(cm, scrollPos.scrollLeft); }
3465 }
3466
3467 // Calculate a new scroll position needed to scroll the given
3468 // rectangle into view. Returns an object with scrollTop and

Callers 1

addEditorMethodsFunction · 0.85

Calls 3

calculateScrollPosFunction · 0.85
updateScrollTopFunction · 0.85
setScrollLeftFunction · 0.85

Tested by

no test coverage detected