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

Keeps track of the first source element

public

mirror: *

Keeps track of the mirror 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

private

Mirror created handler

private

Mirror destroy handler

Public Constructors

public constructor(draggable: Draggable) source

Snappable constructor.

Params:

NameTypeAttributeDescription
draggable Draggable

Draggable instance

Public Members

public firstSource: * source

Keeps track of the first source element

Properties:

NameTypeAttributeDescription
firstSource HTMLElement | null

public mirror: * source

Keeps track of the mirror element

Properties:

NameTypeAttributeDescription
mirror HTMLElement

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

private [onMirrorCreated](mirrorEvent: MirrorCreatedEvent) source

Mirror created handler

Params:

NameTypeAttributeDescription
mirrorEvent MirrorCreatedEvent

private [onMirrorDestroy](mirrorEvent: MirrorDestroyEvent) source

Mirror destroy handler

Params:

NameTypeAttributeDescription
mirrorEvent MirrorDestroyEvent