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

Function scrollToCoordsRange

samples/common/codehighlight/codemirror.js:3540–3548  ·  view source on GitHub ↗
(cm, from, to, margin)

Source from the content-addressed store, hash-verified

3538 }
3539
3540 function scrollToCoordsRange(cm, from, to, margin) {
3541 var sPos = calculateScrollPos(cm, {
3542 left: Math.min(from.left, to.left),
3543 top: Math.min(from.top, to.top) - margin,
3544 right: Math.max(from.right, to.right),
3545 bottom: Math.max(from.bottom, to.bottom) + margin
3546 });
3547 scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop);
3548 }
3549
3550 // Sync the scrollable area and scrollbars, ensure the viewport
3551 // covers the visible area.

Callers 2

resolveScrollToPosFunction · 0.85
addEditorMethodsFunction · 0.85

Calls 2

calculateScrollPosFunction · 0.85
scrollToCoordsFunction · 0.85

Tested by

no test coverage detected