(cm, rect)
| 4915 | |
| 4916 | // Scroll a given set of coordinates into view (immediately). |
| 4917 | function scrollIntoView(cm, rect) { |
| 4918 | var scrollPos = calculateScrollPos(cm, rect) |
| 4919 | if (scrollPos.scrollTop != null) { |
| 4920 | updateScrollTop(cm, scrollPos.scrollTop) |
| 4921 | } |
| 4922 | if (scrollPos.scrollLeft != null) { |
| 4923 | setScrollLeft(cm, scrollPos.scrollLeft) |
| 4924 | } |
| 4925 | } |
| 4926 | |
| 4927 | // Calculate a new scroll position needed to scroll the given |
| 4928 | // rectangle into view. Returns an object with scrollTop and |
no test coverage detected