Skip to main content

Interface: GestureDragProps

Defined in: types.ts:126

Props for GestureDrag controller.

Enables tracking drag gestures (mouse/touch drag movements) on a widget. Use this for drawing, panning, or any interaction that tracks movement from a start point.

Properties

onGestureDragBegin()?

optional onGestureDragBegin: (startX, startY) => void

Defined in: types.ts:132

Called when a drag gesture begins.

Parameters

ParameterTypeDescription
startXnumberX coordinate where the drag started
startYnumberY coordinate where the drag started

Returns

void


onGestureDragEnd()?

optional onGestureDragEnd: (offsetX, offsetY) => void

Defined in: types.ts:144

Called when the drag gesture ends.

Parameters

ParameterTypeDescription
offsetXnumberFinal horizontal offset from the start point
offsetYnumberFinal vertical offset from the start point

Returns

void


onGestureDragUpdate()?

optional onGestureDragUpdate: (offsetX, offsetY) => void

Defined in: types.ts:138

Called as the drag gesture continues.

Parameters

ParameterTypeDescription
offsetXnumberHorizontal offset from the start point
offsetYnumberVertical offset from the start point

Returns

void