(cm, rect)
| 67 | |
| 68 | // Scroll a given set of coordinates into view (immediately). |
| 69 | export function scrollIntoView(cm, rect) { |
| 70 | let scrollPos = calculateScrollPos(cm, rect) |
| 71 | if (scrollPos.scrollTop != null) updateScrollTop(cm, scrollPos.scrollTop) |
| 72 | if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft) |
| 73 | } |
| 74 | |
| 75 | // Calculate a new scroll position needed to scroll the given |
| 76 | // rectangle into view. Returns an object with scrollTop and |
no test coverage detected