(y)
| 683 | * @param {number} y The scroll position. |
| 684 | */ |
| 685 | export async function scrollViewportVertically(y) { |
| 686 | const isWindow = hot().view._wt.wtOverlays.scrollableElement === hot().rootWindow; |
| 687 | const scrollableElement = isWindow ? window : getMaster().find('.wtHolder')[0]; |
| 688 | |
| 689 | return new Promise((resolve) => { |
| 690 | const scrollHandler = () => { |
| 691 | scrollableElement.removeEventListener('scroll', scrollHandler); |
| 692 | resolve(); |
| 693 | }; |
| 694 | |
| 695 | scrollableElement.addEventListener('scroll', scrollHandler); |
| 696 | |
| 697 | if (isWindow) { |
| 698 | scrollableElement.scrollTo(scrollableElement.scrollX, y); |
| 699 | } else { |
| 700 | scrollableElement.scrollTop = y; |
| 701 | } |
| 702 | }); |
| 703 | } |
| 704 | |
| 705 | /** |
| 706 | * Moves the table's viewport to the specified x scroll position. |
nothing calls this directly
no test coverage detected
searching dependent graphs…