Home Reference Source
public class | source

Snappable

Extends:

* → Snappable

Snappable plugin which snaps draggable elements into place

Constructor Summary

Public Constructor
public

constructor(draggable: Draggable)

Snappable constructor.

Member Summary

Public Members
public

firstSource: HTMLElement | null

Keeps track of the first source element

Method Summary

Public Methods
public

attach()

Attaches plugins event listeners

public

detach()

Detaches plugins event listeners

Private Methods
private

[onDragOut](event: DragOutEvent | DroppableOutEvent)

Drag out handler

private

[onDragOver](event: DragOverEvent | DroppableOverEvent)

Drag over handler

private

Drag start handler

private

Drag stop handler

Public Constructors

public constructor(draggable: Draggable) source

Snappable constructor.

Params:

NameTypeAttributeDescription
draggable Draggable

Draggable instance

Public Members

public firstSource: HTMLElement | null source

Keeps track of the first source element

Properties:

NameTypeAttributeDescription
firstSource HTMLElement | null

Public Methods

public attach() source

Attaches plugins event listeners

public detach() source

Detaches plugins event listeners

Private Methods

private [onDragOut](event: DragOutEvent | DroppableOutEvent) source

Drag out handler

Params:

NameTypeAttributeDescription
event DragOutEvent | DroppableOutEvent

Drag out event

private [onDragOver](event: DragOverEvent | DroppableOverEvent) source

Drag over handler

Params:

NameTypeAttributeDescription
event DragOverEvent | DroppableOverEvent

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