(cm, rect)
| 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 |
no test coverage detected