Home Reference Source
public class | source

MouseSensor

Extends:

* → MouseSensor

This sensor picks up native browser mouse events and dictates drag operations

Constructor Summary

Public Constructor
public

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

MouseSensor constructor.

Member Summary

Public Members
public
public
public

Indicates if mouse button is still down

public

Mouse down timer which will end up triggering the drag start operation

public

Indicates if context menu has been opened during drag operation

Method Summary

Public Methods
public

attach()

Attaches sensors event listeners to the DOM

public

detach()

Detaches sensors event listeners to the DOM

Private Methods
private

Context menu handler

private

[onMouseDown](event: Event)

Mouse down handler

private

[onMouseMove](event: Event)

Mouse move handler

private

[onMouseUp](event: Event)

Mouse up handler

Public Constructors

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

MouseSensor constructor.

Params:

NameTypeAttributeDescription
containers HTMLElement[] | NodeList | HTMLElement

Containers

options Object

Options

Public Members

public currentContainer: * source

public dragging: * source

public mouseDown: Boolean source

Indicates if mouse button is still down

Properties:

NameTypeAttributeDescription
mouseDown *

public mouseDownTimeout: Number source

Mouse down timer which will end up triggering the drag start operation

Properties:

NameTypeAttributeDescription
mouseDownTimeout *

public openedContextMenu: Boolean source

Indicates if context menu has been opened during drag operation

Properties:

NameTypeAttributeDescription
openedContextMenu *

Public Methods

public attach() source

Attaches sensors event listeners to the DOM

public detach() source

Detaches sensors event listeners to the DOM

Private Methods

private [onContextMenuWhileDragging](event: Event) source

Context menu handler

Params:

NameTypeAttributeDescription
event Event

Context menu event

private [onMouseDown](event: Event) source

Mouse down handler

Params:

NameTypeAttributeDescription
event Event

Mouse down event

private [onMouseMove](event: Event) source

Mouse move handler

Params:

NameTypeAttributeDescription
event Event

Mouse move event

private [onMouseUp](event: Event) source

Mouse up handler

Params:

NameTypeAttributeDescription
event Event

Mouse up event