Skip to main content

Interface: DragValueMapping

Defined in: dom/src/pointer/drag-value.ts:45

Turns pointer movement into a position on each axis: 0 is the min end of the travel and 1 the max end, before reverse and the scaling of AxisOptions are applied.

A mapping holds the state of the drag in progress, so an instance belongs to a single createDragValue instance.

Properties​

move​

move: (state, context) => XY<number> | null;

Defined in: dom/src/pointer/drag-value.ts:51

Parameters​

ParameterType
stateDragState
contextMappingContext

Returns​

XY<number> | null


start​

start: (state, context) => XY<number> | null;

Defined in: dom/src/pointer/drag-value.ts:50

Parameters​

ParameterType
stateDragState
contextMappingContext

Returns​

XY<number> | null

the position, or null when it cannot be determined and the event should be ignored.