Skip to main content

IDragAndDropOptions<T>

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

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