(cm, x1, y1, x2, y2)
| 4625 | |
| 4626 | // Scroll a given set of coordinates into view (immediately). |
| 4627 | function scrollIntoView(cm, x1, y1, x2, y2) { |
| 4628 | var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); |
| 4629 | if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); |
| 4630 | if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); |
| 4631 | } |
| 4632 | |
| 4633 | // Calculate a new scroll position needed to scroll the given |
| 4634 | // rectangle into view. Returns an object with scrollTop and |
no test coverage detected