Skip to main content

Class: TouchCaptor<N, E, G>

Defined in: sigma/src/core/captors/touch.ts:43

Touch captor class.

Extends​

  • default<TouchCaptorEvents, N, E, G>

Type Parameters​

• N extends Attributes = Attributes

• E extends Attributes = Attributes

• G extends Attributes = Attributes

Constructors​

new TouchCaptor()​

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

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

Parameters​

container​

HTMLElement

renderer​

Sigma<N, E, G>

Returns​

TouchCaptor<N, E, G>

Overrides​

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

Properties​

container​

container: HTMLElement

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

Inherited from​

Captor.container


enabled​

enabled: boolean = true

Defined in: sigma/src/core/captors/touch.ts:48


hasMoved​

hasMoved: boolean = false

Defined in: sigma/src/core/captors/touch.ts:50


isMoving​

isMoving: boolean = false

Defined in: sigma/src/core/captors/touch.ts:49


lastTap​

lastTap: null | { position: Coordinates; time: number; } = null

Defined in: sigma/src/core/captors/touch.ts:60


lastTouches​

lastTouches: Touch[] = []

Defined in: sigma/src/core/captors/touch.ts:59


lastTouchesPositions?​

optional lastTouchesPositions: Coordinates[]

Defined in: sigma/src/core/captors/touch.ts:58


movingTimeout?​

optional movingTimeout: number

Defined in: sigma/src/core/captors/touch.ts:53


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: TouchSettings = DEFAULT_TOUCH_SETTINGS

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


startCameraState?​

optional startCameraState: CameraState

Defined in: sigma/src/core/captors/touch.ts:51


startTouchesAngle?​

optional startTouchesAngle: number

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


startTouchesDistance?​

optional startTouchesDistance: number

Defined in: sigma/src/core/captors/touch.ts:56


startTouchesPositions​

startTouchesPositions: Coordinates[] = []

Defined in: sigma/src/core/captors/touch.ts:57


touchMode​

touchMode: number = 0

Defined in: sigma/src/core/captors/touch.ts:52

Methods​

addListener()​

addListener<Event>(type, listener): this

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

listener​

TouchCaptorEvents[Event]

Returns​

this

Inherited from​

Captor.addListener


emit()​

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

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

args​

...Parameters<TouchCaptorEvents[Event]>

Returns​

boolean

Inherited from​

Captor.emit


eventNames()​

eventNames<Event>(): Event[]

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

Type Parameters​

• Event extends TouchCaptorEventType

Returns​

Event[]

Inherited from​

Captor.eventNames


getDimensions()​

getDimensions(): Dimensions

Defined in: sigma/src/core/captors/touch.ts:88

Returns​

Dimensions


getMaxListeners()​

getMaxListeners(): number

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

Returns​

number

Inherited from​

Captor.getMaxListeners


handleLeave()​

handleLeave(e): void

Defined in: sigma/src/core/captors/touch.ts:118

Parameters​

e​

TouchEvent

Returns​

void


handleMove()​

handleMove(e): void

Defined in: sigma/src/core/captors/touch.ts:201

Parameters​

e​

TouchEvent

Returns​

void


handleStart()​

handleStart(e): void

Defined in: sigma/src/core/captors/touch.ts:95

Parameters​

e​

TouchEvent

Returns​

void


kill()​

kill(): void

Defined in: sigma/src/core/captors/touch.ts:79

Returns​

void

Overrides​

Captor.kill


listenerCount()​

listenerCount<Event>(type): number

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

Returns​

number

Inherited from​

Captor.listenerCount


listeners()​

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

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

Returns​

TouchCaptorEvents[Event][]

Inherited from​

Captor.listeners


off()​

off<Event>(type, listener): this

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

listener​

TouchCaptorEvents[Event]

Returns​

this

Inherited from​

Captor.off


on()​

on<Event>(type, listener): this

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

listener​

TouchCaptorEvents[Event]

Returns​

this

Inherited from​

Captor.on


once()​

once<Event>(type, listener): this

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

listener​

TouchCaptorEvents[Event]

Returns​

this

Inherited from​

Captor.once


prependListener()​

prependListener<Event>(type, listener): this

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

listener​

TouchCaptorEvents[Event]

Returns​

this

Inherited from​

Captor.prependListener


prependOnceListener()​

prependOnceListener<Event>(type, listener): this

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

listener​

TouchCaptorEvents[Event]

Returns​

this

Inherited from​

Captor.prependOnceListener


rawListeners()​

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

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

Type Parameters​

• Event extends TouchCaptorEventType

Parameters​

type​

Event

Returns​

TouchCaptorEvents[Event][]

Inherited from​

Captor.rawListeners


removeAllListeners()​

removeAllListeners<Event>(type?): this

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

Type Parameters​

• Event extends TouchCaptorEventType

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 TouchCaptorEventType

Parameters​

type​

Event

listener​

TouchCaptorEvents[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/touch.ts:321

Parameters​

settings​

TouchSettings

Returns​

void