Skip to main content

IDragAndDropOptions<T>

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

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