Skip to content

@whittakertech/mosaic / DragLifecycleHooks

Interface: DragLifecycleHooks

Defined in: drag/lifecycle.ts:16

Lifecycle hooks for observing MosaicJS drag behavior.

Each hook is invoked at a specific point in the drag lifecycle and receives an immutable drag context.

Remarks

Hooks are invoked in strict alignment with the internal deterministic state machine.

Invoking a hook in an unexpected state will throw an error.

Properties

onDragEnd()?

ts
optional onDragEnd: (ctx) => void;

Defined in: drag/lifecycle.ts:24

Parameters

ctx

DragContext

Returns

void


onDragMove()?

ts
optional onDragMove: (ctx) => void;

Defined in: drag/lifecycle.ts:18

Parameters

ctx

DragContext

Returns

void


onDragStart()?

ts
optional onDragStart: (ctx) => void;

Defined in: drag/lifecycle.ts:17

Parameters

ctx

DragContext

Returns

void


onDropConfirmed()?

ts
optional onDropConfirmed: (ctx) => void;

Defined in: drag/lifecycle.ts:21

Parameters

ctx

DragContext

Returns

void


onDropRejected()?

ts
optional onDropRejected: (ctx) => void;

Defined in: drag/lifecycle.ts:22

Parameters

ctx

DragContext

Returns

void


onPreDrop()?

ts
optional onPreDrop: (ctx) => void;

Defined in: drag/lifecycle.ts:20

Parameters

ctx

DragContext

Returns

void