MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / scrollPreviewTo

Function scrollPreviewTo

packages/app-core/src/components/VimNav.tsx:1713–1717  ·  view source on GitHub ↗
(previewEl: HTMLElement, top: number)

Source from the content-addressed store, hash-verified

1711 }
1712
1713 function scrollPreviewTo(previewEl: HTMLElement, top: number): void {
1714 const maxTop = Math.max(0, previewEl.scrollHeight - previewEl.clientHeight)
1715 const clamped = Math.max(0, Math.min(maxTop, top))
1716 previewEl.scrollTo({ top: clamped, behavior: 'auto' })
1717 }
1718
1719 function getIndexedElements(
1720 selector: string,

Callers 1

handlePreviewKeyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected