Home Reference Source
public class | source

Mirror

Extends:

* → Mirror

Mirror plugin which controls the mirror positioning while dragging

Constructor Summary

Public Constructor
public

constructor(draggable: Draggable)

Mirror constructor.

Member Summary

Public Members
public

initialScrollOffset: {"x": *, "y": *}

Initial scroll offset for touch devices because the mirror is positioned fixed

public
public
public

lastMirrorMovedClient: {"x": *, "y": *}

public
public
public

mirror: *

public
public

Mirror options

public

scrollOffset: {"x": *, "y": *}

Scroll offset for touch devices because the mirror is positioned fixed

Method Summary

Public Methods
public

[onDragMove](dragEvent: *)

public

[onDragStart](dragEvent: *)

public

[onDragStop](dragEvent: *)

public
public

attach()

Attaches plugins event listeners

public

detach()

Detaches plugins event listeners

public

Returns options passed through draggable

Private Methods
private

[getAppendableContainer](options: Object): HTMLElement

Returns appendable container for mirror based on the appendTo option

private

Mirror created handler

private

Mirror move handler

Public Constructors

public constructor(draggable: Draggable) source

Mirror constructor.

Params:

NameTypeAttributeDescription
draggable Draggable

Draggable instance

Public Members

public initialScrollOffset: {"x": *, "y": *} source

Initial scroll offset for touch devices because the mirror is positioned fixed

Properties:

NameTypeAttributeDescription
scrollOffset Object
scrollOffset.x Number
scrollOffset.y Number

public initialX: * source

public initialY: * source

public lastMirrorMovedClient: {"x": *, "y": *} source

public lastMovedX: * source

public lastMovedY: * source

public mirror: * source

public mirrorOffset: * source

public options: Object source

Mirror options

Properties:

NameTypeAttributeDescription
options Object
options.constrainDimensions Boolean
options.xAxis Boolean
options.yAxis Boolean
options.cursorOffsetX Number | null
options.cursorOffsetY Number | null
options.appendTo String | HTMLElement | Function

public scrollOffset: {"x": *, "y": *} source

Scroll offset for touch devices because the mirror is positioned fixed

Properties:

NameTypeAttributeDescription
scrollOffset Object
scrollOffset.x Number
scrollOffset.y Number

Public Methods

public [onDragMove](dragEvent: *) source

Params:

NameTypeAttributeDescription
dragEvent *

public [onDragStart](dragEvent: *) source

Params:

NameTypeAttributeDescription
dragEvent *

public [onDragStop](dragEvent: *) source

Params:

NameTypeAttributeDescription
dragEvent *

public [onScroll]() source

public attach() source

Attaches plugins event listeners

public detach() source

Detaches plugins event listeners

public getOptions(): Object source

Returns options passed through draggable

Return:

Object

Private Methods

private [getAppendableContainer](options: Object): HTMLElement source

Returns appendable container for mirror based on the appendTo option

Params:

NameTypeAttributeDescription
options Object
options.source HTMLElement

Current source

Return:

HTMLElement

private [onMirrorCreated](mirrorEvent: MirrorCreatedEvent): Promise source

Mirror created handler

Params:

NameTypeAttributeDescription
mirrorEvent MirrorCreatedEvent

Return:

Promise

private [onMirrorMove](mirrorEvent: MirrorMoveEvent): Promise | null source

Mirror move handler

Params:

NameTypeAttributeDescription
mirrorEvent MirrorMoveEvent

Return:

Promise | null