Events
These are the events that can be hooked into during the lifecycle of a drag&drop.
NOTE
The EventHandler
is a generic that all events derive from. You can see it's definition here.
onStart
optional
- Type:
EventHandler
Triggered when dragging starts.
onLeave
optional
- Type:
EventHandler
Triggered when the draggable leaves a zone.
onEnter
optional
- Type:
EventHandler
Triggered when the draggable enters a zone.
onOver
optional
- Type:
EventHandler
Triggered when the draggable is over a zone.
onBeforeDrop
optional
- Type:
EventHandler<boolean>
Triggered before the draggable is dropped. Return true
to allow the drop, or false
to disallow it.
onDrop
optional
- Type:
EventHandler
Triggered when the draggable is dropped. If onbeforeDrop
returns false
this won't trigger.
onCreateShadow
optional
- Type:
EventHandler<CustomShadow>
- See reference for
CustomShadow
Triggered to create a custom shadow element. Will override the default shadow behavior.
NOTE
This won't work if enableShadow
is set to false
.
onEnd
optional
- Type:
EventHandler
Triggered when the drag ends.