Skip to main content

Class: ScrollAxis

Defined in: layout/viewport/scroll-axis.ts:84

Constructors​

Constructor​

new ScrollAxis(position?): ScrollAxis

Defined in: layout/viewport/scroll-axis.ts:94

Parameters​

position?​

number = 0

Returns​

ScrollAxis

Accessors​

state​

Get Signature​

get state(): ScrollAxisState

Defined in: layout/viewport/scroll-axis.ts:100

Resolved + clamped, memoized until an input changes.

Returns​

ScrollAxisState

Methods​

batch()​

batch(run): void

Defined in: layout/viewport/scroll-axis.ts:115

Several writes, at most one notification. Re-entrant; flushes at the outermost exit, in a finally so a throwing run cannot wedge the axis (conventions §5).

Parameters​

run​

() => void

Returns​

void


panTo()​

panTo(position): void

Defined in: layout/viewport/scroll-axis.ts:106

Move this direction. Clamps to [0, max] at write time — nothing else ever rewrites position; a later shrink of max leaves it exactly where a caller last asked.

Parameters​

position​

number

Returns​

void