Home Reference Source
public class | source

Swappable

Extends:

* → Swappable

Swappable is built on top of Draggable and allows swapping of draggable elements. Order is irrelevant to Swappable.

Constructor Summary

Public Constructor
public

constructor(containers: HTMLElement[] | NodeList | HTMLElement, options: Object)

Swappable constructor.

Member Summary

Public Members
public

lastOver: HTMLElement

Last draggable element that was dragged over

Method Summary

Public Methods
public

Destroys Swappable instance.

Private Methods
private

Drag over handler

private

Drag start handler

private

Drag stop handler

Public Constructors

public constructor(containers: HTMLElement[] | NodeList | HTMLElement, options: Object) source

Swappable constructor.

Params:

NameTypeAttributeDescription
containers HTMLElement[] | NodeList | HTMLElement

Swappable containers

options Object

Options for Swappable

Public Members

public lastOver: HTMLElement source

Last draggable element that was dragged over

Properties:

NameTypeAttributeDescription
lastOver *

Public Methods

public destroy() source

Destroys Swappable instance.

Private Methods

private [onDragOver](event: DragOverEvent) source

Drag over handler

Params:

NameTypeAttributeDescription
event DragOverEvent

Drag over event

private [onDragStart](event: DragStartEvent) source

Drag start handler

Params:

NameTypeAttributeDescription
event DragStartEvent

Drag start event

private [onDragStop](event: DragStopEvent) source

Drag stop handler

Params:

NameTypeAttributeDescription
event DragStopEvent

Drag stop event