Skip to main content

IDragAndDropOptions<T>

Defined in: ui.ts:779

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