(cm, from, to, margin)
| 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. |
no test coverage detected