Skip to main content

Class: MouseCaptor<N, E, G>

Defined in: sigma/src/core/captors/mouse.ts:55

Mouse captor class.

Extends

  • default<MouseCaptorEvents, N, E, G>

Type Parameters

N extends Attributes = Attributes

E extends Attributes = Attributes

G extends Attributes = Attributes

Constructors

new MouseCaptor()

new MouseCaptor<N, E, G>(container, renderer): MouseCaptor<N, E, G>

Defined in: sigma/src/core/captors/mouse.ts:78

Parameters

container

HTMLElement

renderer

Sigma<N, E, G>

Returns

MouseCaptor<N, E, G>

Overrides

Captor<MouseCaptorEvents, N, E, G>.constructor

Properties

clicks

clicks: number = 0

Defined in: sigma/src/core/captors/mouse.ts:70


container

container: HTMLElement

Defined in: sigma/src/core/captors/captor.ts:142

Inherited from

Captor.container


currentWheelDirection

currentWheelDirection: -1 | 0 | 1 = 0

Defined in: sigma/src/core/captors/mouse.ts:73


doubleClickTimeout

doubleClickTimeout: null | number = null

Defined in: sigma/src/core/captors/mouse.ts:71


downStartTime

downStartTime: null | number = null

Defined in: sigma/src/core/captors/mouse.ts:63


draggedEvents

draggedEvents: number = 0

Defined in: sigma/src/core/captors/mouse.ts:62


enabled

enabled: boolean = true

Defined in: sigma/src/core/captors/mouse.ts:61


isMouseDown

isMouseDown: boolean = false

Defined in: sigma/src/core/captors/mouse.ts:66


isMoving

isMoving: boolean = false

Defined in: sigma/src/core/captors/mouse.ts:67


lastMouseX

lastMouseX: null | number = null

Defined in: sigma/src/core/captors/mouse.ts:64


lastMouseY

lastMouseY: null | number = null

Defined in: sigma/src/core/captors/mouse.ts:65


lastWheelTriggerTime?

optional lastWheelTriggerTime: number

Defined in: sigma/src/core/captors/mouse.ts:74


movingTimeout

movingTimeout: null | number = null

Defined in: sigma/src/core/captors/mouse.ts:68


rawEmitter

rawEmitter: EventEmitter

Defined in: sigma/src/types.ts:114

Inherited from

Captor.rawEmitter


renderer

renderer: Sigma<N, E, G>

Defined in: sigma/src/core/captors/captor.ts:143

Inherited from

Captor.renderer


settings

settings: MouseSettings = DEFAULT_MOUSE_SETTINGS

Defined in: sigma/src/core/captors/mouse.ts:76


startCameraState

startCameraState: null | CameraState = null

Defined in: sigma/src/core/captors/mouse.ts:69

Methods

addListener()

addListener<Event>(type, listener): this

Defined in: sigma/src/types.ts:120

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

listener

MouseCaptorEvents[Event]

Returns

this

Inherited from

Captor.addListener


emit()

emit<Event>(type, ...args): boolean

Defined in: sigma/src/types.ts:119

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

args

...Parameters<MouseCaptorEvents[Event]>

Returns

boolean

Inherited from

Captor.emit


eventNames()

eventNames<Event>(): Event[]

Defined in: sigma/src/types.ts:116

Type Parameters

Event extends keyof MouseCaptorEvents

Returns

Event[]

Inherited from

Captor.eventNames


getMaxListeners()

getMaxListeners(): number

Defined in: sigma/src/types.ts:118

Returns

number

Inherited from

Captor.getMaxListeners


handleClick()

handleClick(e): void

Defined in: sigma/src/core/captors/mouse.ts:117

Parameters

e

MouseEvent

Returns

void


handleDoubleClick()

handleDoubleClick(e): void

Defined in: sigma/src/core/captors/mouse.ts:147

Parameters

e

MouseEvent

Returns

void


handleDown()

handleDown(e): void

Defined in: sigma/src/core/captors/mouse.ts:168

Parameters

e

MouseEvent

Returns

void


handleEnter()

handleEnter(e): void

Defined in: sigma/src/core/captors/mouse.ts:305

Parameters

e

MouseEvent

Returns

void


handleLeave()

handleLeave(e): void

Defined in: sigma/src/core/captors/mouse.ts:301

Parameters

e

MouseEvent

Returns

void


handleMove()

handleMove(e): void

Defined in: sigma/src/core/captors/mouse.ts:238

Parameters

e

MouseEvent

Returns

void


handleRightClick()

handleRightClick(e): void

Defined in: sigma/src/core/captors/mouse.ts:141

Parameters

e

MouseEvent

Returns

void


handleUp()

handleUp(e): void

Defined in: sigma/src/core/captors/mouse.ts:188

Parameters

e

MouseEvent

Returns

void


handleWheel()

handleWheel(e): void

Defined in: sigma/src/core/captors/mouse.ts:309

Parameters

e

WheelEvent

Returns

void


kill()

kill(): void

Defined in: sigma/src/core/captors/mouse.ts:103

Returns

void

Overrides

Captor.kill


listenerCount()

listenerCount<Event>(type): number

Defined in: sigma/src/types.ts:129

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

Returns

number

Inherited from

Captor.listenerCount


listeners()

listeners<Event>(type): MouseCaptorEvents[Event][]

Defined in: sigma/src/types.ts:128

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

Returns

MouseCaptorEvents[Event][]

Inherited from

Captor.listeners


off()

off<Event>(type, listener): this

Defined in: sigma/src/types.ts:126

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

listener

MouseCaptorEvents[Event]

Returns

this

Inherited from

Captor.off


on()

on<Event>(type, listener): this

Defined in: sigma/src/types.ts:121

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

listener

MouseCaptorEvents[Event]

Returns

this

Inherited from

Captor.on


once()

once<Event>(type, listener): this

Defined in: sigma/src/types.ts:122

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

listener

MouseCaptorEvents[Event]

Returns

this

Inherited from

Captor.once


prependListener()

prependListener<Event>(type, listener): this

Defined in: sigma/src/types.ts:123

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

listener

MouseCaptorEvents[Event]

Returns

this

Inherited from

Captor.prependListener


prependOnceListener()

prependOnceListener<Event>(type, listener): this

Defined in: sigma/src/types.ts:124

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

listener

MouseCaptorEvents[Event]

Returns

this

Inherited from

Captor.prependOnceListener


rawListeners()

rawListeners<Event>(type): MouseCaptorEvents[Event][]

Defined in: sigma/src/types.ts:130

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

Returns

MouseCaptorEvents[Event][]

Inherited from

Captor.rawListeners


removeAllListeners()

removeAllListeners<Event>(type?): this

Defined in: sigma/src/types.ts:127

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type?

Event

Returns

this

Inherited from

Captor.removeAllListeners


removeListener()

removeListener<Event>(type, listener): this

Defined in: sigma/src/types.ts:125

Type Parameters

Event extends keyof MouseCaptorEvents

Parameters

type

Event

listener

MouseCaptorEvents[Event]

Returns

this

Inherited from

Captor.removeListener


setMaxListeners()

setMaxListeners(n): this

Defined in: sigma/src/types.ts:117

Parameters

n

number

Returns

this

Inherited from

Captor.setMaxListeners


setSettings()

setSettings(settings): void

Defined in: sigma/src/core/captors/mouse.ts:363

Parameters

settings

MouseSettings

Returns

void