API Referencev1.3.2
@eigenpal/docx-editor-core/utils/autoScroll
Functions(1)
fn
packages/core/src/utils/autoScroll.ts:21computeAutoScrollDelta
Vertical scroll delta (px/frame) for a pointer at `mouseY` over a container whose viewport spans `rect.top`..`rect.bottom`. Negative scrolls up, positive down, 0 when the pointer is outside both edge zones. Speed ramps linearly from 0 at the edge-zone boundary to `AUTO_SCROLL_MAX_SPEED` at the edge.
declare function computeAutoScrollDelta(rect: {
top: number;
bottom: number;
}, mouseY: number): number;Variables(2)
const
packages/core/src/utils/autoScroll.ts:11AUTO_SCROLL_EDGE_ZONE
Pixel distance from the container edge where auto-scroll activates.
AUTO_SCROLL_EDGE_ZONE = 40const
packages/core/src/utils/autoScroll.ts:13AUTO_SCROLL_MAX_SPEED
Maximum scroll speed in pixels per frame (~60fps).
AUTO_SCROLL_MAX_SPEED = 12