Default onDragChange handler for when no action can handle the request.
Should return true to allow the edges to be moved, or false to prevent it.
Optional
onEnd?: (context: { applied: boolean; cancelled: boolean }) => voidCalled when the drag action ends either because it was completed or cancelled.
Optional
onEvent?: (e: undefined | PointerEvent | KeyboardEvent, cancel: () => void) => voidCalled before searching for a matching action. Useful for re-initializing state.
Is passed a cancel
function if you want to cancel the current drag action.
Optional
onRecalculate?: () => voidCalled while dragging during dragChange events. You can use this to update the dragging edges.
Optional
onRequestChange?: (type: undefined | keyof TDragActions) => voidCalled when the action requested changes.
Optional
activeOptional
onEnd?: (context: { applied: boolean; cancelled: boolean }) => voidCalled when the drag action ends either because it was completed or cancelled.
Optional
onEvent?: (e: undefined | PointerEvent | KeyboardEvent, cancel: () => void) => voidCalled before searching for a matching action. Useful for re-initializing state.
Is passed a cancel
function if you want to cancel the current drag action.
Optional
onRecalculate?: () => voidCalled while dragging during dragChange events. You can use this to update the dragging edges.
Optional
onRequestChange?: (type: undefined | keyof TDragActions) => voidCalled when the action requested changes.
Handles the lifecycle of a drag actions IDragAction and provides additional hooks.
The first action instance that can handle the request is passed control of the event handlers until the request changes.