Home Reference Source
import MouseState from './ui/glpatch/mousestate.js'
public class | source

MouseState

Extends:

Events → MouseState

managing mouse states buttons/position/dragging etc

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get
public get
public get
public
public
public get
public get
public get
public get
public get
public get
public get
public
public get
public get
public get
public get

x: *

public get

y: *

Private Members
private
private

_isDragging: boolean

private

_mouseDownX: number

private

_mouseDownY: number

private

_mouseOverCanvas: boolean

private

_numFingers: number

private
private

_x: number

private

_y: number

Method Summary

Public Methods
public

debug(data: *)

public

getButton(): *

public

isButtonDown(button: *): *

Private Methods
private

_buttonDown(button: *)

private

_buttonUp(button: *)

private

_down(e: *)

private
private

_move(e: *)

private

_setButton(button: *, newState: *)

private
private

_up(e: *)

private

Inherited Summary

From class Events
public

off: *

public

on: *

private
private
private

_log: *

private

_logEvents: boolean

private

_logName: string

public

addEventListener(which: *, cb: *, idPrefix: string): string

add event listener

public

emitEvent(which: string, param1: *, param2: *, param3: *, param4: *, param5: *, param6: *)

emit event

public

hasEventListener(id: *, cb: *): boolean

check event listener registration

public

hasListenerForEventName(eventName: *): boolean

check event listener by name

public

logEvents(enabled: boolean, logName: string)

enable/disable logging of events for the class

public

removeEventListener(id: *, cb: *)

rempve event listener registration

Public Constructors

public constructor() source

Override:

Events#constructor

Public Members

public get buttonAny: * source

public get buttonForLinkInsertOp: * source

public buttonForScrolling: * source

public buttonForSelecting: * source

public get buttonLeft: * source

public get buttonMiddle: * source

public get buttonRight: * source

public get buttonStateForLinkDrag: * source

public get buttonStateForScrolling: * source

public get buttonStateForSelecting: * source

public get buttonStateForSelectionArea: * source

public draggingDistance: * source

public get isDragging: * source

public get mouseOverCanvas: * source

public get numFingers: * source

public get x: * source

public get y: * source

Private Members

private _buttonStates: {} source

private _isDragging: boolean source

private _mouseDownX: number source

private _mouseDownY: number source

private _mouseOverCanvas: boolean source

private _numFingers: number source

private _useDragCablesButton: * source

private _x: number source

private _y: number source

Public Methods

public debug(data: *) source

Params:

NameTypeAttributeDescription
data *

public getButton(): * source

Return:

*

public isButtonDown(button: *): * source

Params:

NameTypeAttributeDescription
button *

Return:

*

Private Methods

private _buttonDown(button: *) source

Params:

NameTypeAttributeDescription
button *

private _buttonUp(button: *) source

Params:

NameTypeAttributeDescription
button *

private _down(e: *) source

Params:

NameTypeAttributeDescription
e *

private _initUserPrefs() source

private _move(e: *) source

Params:

NameTypeAttributeDescription
e *

private _setButton(button: *, newState: *) source

Params:

NameTypeAttributeDescription
button *
newState *

private _setButtonsUp() source

private _up(e: *) source

Params:

NameTypeAttributeDescription
e *

private _updateDebug() source