Skip to main content

IDragAndDropOptions<T>

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

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:785
acceptDrop?(dragObject) => booleanFast predicate used to decide whether to show a drop zone for dragObject.js-api/ui.ts:783
doDrop?(args) => voidHandles the drop. Read args.dragObject, args.copying, args.link, etc.js-api/ui.ts:787
dropIndication?booleanWhen false, suppresses the default d4-drop-zone element. Defaults to true.js-api/ui.ts:805
dropSuggestion?stringText shown inside the default drop zone.js-api/ui.ts:803
dropZoneRectTransformation?(r) => RectTransforms the default rectangle used to position the drop zone over the host.js-api/ui.ts:801
getDropElement?() => ElementReturns the element that should receive the d4-drop class during the drag.js-api/ui.ts:797
makeDropZone?() => ElementReturns a custom drop-zone element, replacing the default .d4-drop-zone.js-api/ui.ts:799
onBeginDrag?(args) => voidFires when a drag session starts and this zone is eligible.js-api/ui.ts:789
onEndDrag?(args) => voidFires when a drag session ends (whether it landed here or not).js-api/ui.ts:791
onMouseEnter?(e, args) => void-js-api/ui.ts:792
onMouseLeave?(e, args) => void-js-api/ui.ts:794
onMouseOut?(e, args) => void-js-api/ui.ts:795
onMouseOver?(e, args) => void-js-api/ui.ts:793