Interface: UseDragDropReturn
Defined in: src/tree-editor/use-drag-drop.ts:37
Properties
dragState
dragState:
DragDropState
Defined in: src/tree-editor/use-drag-drop.ts:39
Current drag/drop state.
onDragEnd
onDragEnd: () =>
void
Defined in: src/tree-editor/use-drag-drop.ts:47
Cancel without dropping.
Returns
void
onDragLeave
onDragLeave: (
targetId) =>void
Defined in: src/tree-editor/use-drag-drop.ts:45
Clear hover state (e.g., when cursor leaves a row).
Parameters
targetId
string
Returns
void
onDragOver
onDragOver: (
targetId,position) =>void
Defined in: src/tree-editor/use-drag-drop.ts:43
Update hover target + position; recomputes isValid.
Parameters
targetId
string
position
Returns
void
onDragStart
onDragStart: (
sourceId) =>void
Defined in: src/tree-editor/use-drag-drop.ts:41
Begin dragging the given node.
Parameters
sourceId
string
Returns
void
onDrop
onDrop: (
targetId,position) =>boolean
Defined in: src/tree-editor/use-drag-drop.ts:52
Commit the drop: executes a MoveNodeCommand if the combo is valid.
Returns true when a command was executed.
Parameters
targetId
string
position
Returns
boolean