interface TrackViewOptions {
    debounceWindow?: number;
    resizeThreshold?: number;
    scrollThreshold?: number;
    skipInitial?: boolean;
}

Properties

debounceWindow?: number

Use this debounce window for the ScrollWatcher and SizeWatcher involved in the view tracking.

IMPORTANT: If the debounce window is non-0 (default), then the callback is always delayed by at least an animation frame following a scroll event to allow for optimized scrollTop/scrollLeft measurements via waitForMeasureTime.

If you set this is 0, this indicates that the callback should be "realtime" and will therefore skip waitForMeasureTime, which could lead to forced re-layouts during scroll, but you probably need this when doing scroll-based animations.

undefined // ScrollWatcher and SizeWatcher defaults
resizeThreshold?: number

Use this resize threshold for the SizeWatcher involved in the view tracking.

undefined // SizeWatcher default
scrollThreshold?: number

Use this scroll threshold for the ScrollWatcher involved in the view tracking.

undefined // ScrollWatcher default
skipInitial?: boolean

Do not call the handler until there's a future resize of the element.

By default we call the handler (almost) immediately with the current size data for the target.

false