* Sets the vertical scroll value of the editor. This is called when the editor is scrolled horizontally using the scrollbar. * @param {Number} value
(value)
| 2515 | * @param {Number} value |
| 2516 | */ |
| 2517 | function onscrollV(value) { |
| 2518 | const scroller = editor?.scrollDOM; |
| 2519 | if (!scroller) return; |
| 2520 | suppressCursorReveal(); |
| 2521 | const normalized = clamp01(value); |
| 2522 | const maxScroll = Math.max( |
| 2523 | scroller.scrollHeight - scroller.clientHeight, |
| 2524 | 0, |
| 2525 | ); |
| 2526 | preventScrollbarV = true; |
| 2527 | scroller.scrollTop = normalized * maxScroll; |
| 2528 | lastScrollTop = scroller.scrollTop; |
| 2529 | lockScrollbarScrollPosition({ top: lastScrollTop }); |
| 2530 | } |
| 2531 | |
| 2532 | /** |
| 2533 | * Handles the onscroll event for the vend element. |
nothing calls this directly
no test coverage detected