Skip to main content

IDragAndDropOptions<T>

Defined in: js-api/ui.ts:803

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.js-api/ui.ts:807
acceptDrop?(dragObject) => booleanFast predicate used to decide whether to show a drop zone for dragObject.js-api/ui.ts:805
doDrop?(args) => voidHandles the drop. Read args.dragObject, args.copying, args.link, etc.js-api/ui.ts:809
dropIndication?booleanWhen false, suppresses the default d4-drop-zone element. Defaults to true.js-api/ui.ts:827
dropSuggestion?stringText shown inside the default drop zone.js-api/ui.ts:825
dropZoneRectTransformation?(r) => RectTransforms the default rectangle used to position the drop zone over the host.js-api/ui.ts:823
getDropElement?() => ElementReturns the element that should receive the d4-drop class during the drag.js-api/ui.ts:819
makeDropZone?() => ElementReturns a custom drop-zone element, replacing the default .d4-drop-zone.js-api/ui.ts:821
onBeginDrag?(args) => voidFires when a drag session starts and this zone is eligible.js-api/ui.ts:811
onEndDrag?(args) => voidFires when a drag session ends (whether it landed here or not).js-api/ui.ts:813
onMouseEnter?(e, args) => void-js-api/ui.ts:814
onMouseLeave?(e, args) => void-js-api/ui.ts:816
onMouseOut?(e, args) => void-js-api/ui.ts:817
onMouseOver?(e, args) => void-js-api/ui.ts:815