Back to Draggable

README

src/Swappable/SwappableEvent/README.md

1.2.13.5 KB
Original Source

Swappable

The base swappable event for all Swappable events that Swappable emits.

InterfaceSwappableEvent
Cancelablefalse
Cancel action-
typeswappable

API

swappableEvent.dragEvent: DragEvent
Read-only property for the original drag event that triggered the swappable event.

SwappableStartEvent

SwappableStartEvent gets triggered by Swappable on drag start.

SpecificationSwappableEvent
InterfaceSwappableStartEvent
Cancelabletrue
Cancel actionPrevents drag start
typeswappable:start

SwappableSwapEvent

SwappableSwapEvent gets triggered by Swappable before swapping with another draggable.

SpecificationSwappableEvent
InterfaceSwappableSwapEvent
Cancelabletrue
Cancel actionPrevents swapping
typeswappable:swap

API

swappableEvent.over: HTMLElement
Read-only property for the draggable element that you are over.

swappableEvent.overContainer: HTMLElement
Read-only property for the draggable container element that you are over.

SwappableSwappedEvent

SwappableSwappedEvent gets triggered by Swappable when sorted with another draggable.

SpecificationSwappableEvent
InterfaceSwappableSwappedEvent
Cancelablefalse
Cancel action-
typeswappable:swapped

API

swappableEvent.swappedElement: HTMLElement
Read-only property for the draggable element you swapped with.

SwappableStopEvent

SwappableStopEvent gets triggered by Swappable on drag stop.

SpecificationSwappableEvent
InterfaceSwappableStopEvent
Cancelablefalse
Cancel action-
typeswappable:stop