Skip to main content

IDragAndDropOptions<T>

Defined in: ui.ts:749

Options for makeDroppable. All callbacks are optional; pass only what you need.

Type Parameters

Type ParameterDefault type
Tany

Properties

PropertyTypeDescriptionDefined in
acceptDrag?(args) => booleanPredicate called with the full DragDropArgs — veto by returning false or setting args.handled = true.ui.ts:753
acceptDrop?(dragObject) => booleanFast predicate used to decide whether to show a drop zone for dragObject.ui.ts:751
doDrop?(args) => voidHandles the drop. Read args.dragObject, args.copying, args.link, etc.ui.ts:755
dropIndication?booleanWhen false, suppresses the default d4-drop-zone element. Defaults to true.ui.ts:773
dropSuggestion?stringText shown inside the default drop zone.ui.ts:771
dropZoneRectTransformation?(r) => RectTransforms the default rectangle used to position the drop zone over the host.ui.ts:769
getDropElement?() => ElementReturns the element that should receive the d4-drop class during the drag.ui.ts:765
makeDropZone?() => ElementReturns a custom drop-zone element, replacing the default .d4-drop-zone.ui.ts:767
onBeginDrag?(args) => voidFires when a drag session starts and this zone is eligible.ui.ts:757
onEndDrag?(args) => voidFires when a drag session ends (whether it landed here or not).ui.ts:759
onMouseEnter?(e, args) => void-ui.ts:760
onMouseLeave?(e, args) => void-ui.ts:762
onMouseOut?(e, args) => void-ui.ts:763
onMouseOver?(e, args) => void-ui.ts:761