Back to Draggable

README

src/Sortable/SortableEvent/README.md

1.2.14.6 KB
Original Source

SortableEvent

The base sortable event for all Sortable events that Sortable emits.

InterfaceSortableEvent
Cancelablefalse
Cancel action-
typesortable

API

sortableEvent.dragEvent: DragEvent
Read-only property for the original drag event that triggered the sortable event.

SortableStartEvent

SortableStartEvent gets triggered by Sortable when on drag start.

SpecificationSortableEvent
InterfaceSortableStartEvent
Cancelabletrue
Cancel actionPrevents drag start
typesortable:start

API

sortableEvent.startIndex: Number
Read-only property for the start index of the current draggable source.

sortableEvent.startContainer: HTMLElement
Read-only property for the start container of the current draggable source.

SortableSortEvent

SortableSortEvent gets triggered by Sortable before sorting with another draggable.

SpecificationSortableEvent
InterfaceSortableSortEvent
Cancelabletrue
Cancel actionPrevents sorting
typesortable:sort

API

sortableEvent.currentIndex: Number
Read-only property for the index of the current draggable source.

sortableEvent.over: HTMLElement
Read-only property for the draggable source you are hovering over.

sortableEvent.overContainer: HTMLElement
Read-only property for the container of the draggable source you are hovering over.

SortableSortedEvent

SortableSortedEvent gets triggered by Sortable when sorted with another draggable.

SpecificationSortableEvent
InterfaceSortableSortedEvent
Cancelablefalse
Cancel action-
typesortable:sorted

API

sortableEvent.oldIndex: Number
Read-only property for the old index of the current draggable source.

sortableEvent.newIndex: Number
Read-only property for the new index of the current draggable source.

sortableEvent.oldContainer: HTMLElement
Read-only property for the old container of the current draggable source.

sortableEvent.newContainer: HTMLElement
Read-only property for the new container of the current draggable source.

SortableStopEvent

SortableStopEvent gets triggered by Sortable on drag stop.

SpecificationSortableEvent
InterfaceSortableStopEvent
Cancelablefalse
Cancel action-
typesortable:stop

API

sortableEvent.oldIndex: Number
Read-only property for the old index of the current draggable source.

sortableEvent.newIndex: Number
Read-only property for the new index of the current draggable source.

sortableEvent.oldContainer: HTMLElement
Read-only property for the old container of the current draggable source.

sortableEvent.newContainer: HTMLElement
Read-only property for the new container of the current draggable source.