computeScrollMapping
Since v2.13.0
Compute a mapping between the spacer’s native scrollTop and the virtual row-content scroll offset.
For datasets within maxSpacerHeight, mapping is identity (no transform).
Above the cap, the spacer is clamped and scrollTop units no longer equal
row-content units — call toVirtualScrollTop / fromVirtualScrollTop
to translate between the two coordinate spaces.
function computeScrollMapping(rawContentHeight: number, viewportHeight: number, maxSpacerHeight: number): ScrollMappingParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
rawContentHeight | number | |
viewportHeight | number | |
maxSpacerHeight | number |
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://toolboxjs.com/llms-full.txt