Skip to main content

Class: TouchPress<T = unknown>

Defined in: core/touch-press.ts:83

Type Parameters

Type ParameterDefault type
Tunknown

Constructors

Constructor

new TouchPress<T = unknown>(options?: Partial<TouchPressOptions>): TouchPress<T>;

Defined in: core/touch-press.ts:90

Parameters

ParameterType
optionsPartial<TouchPressOptions>

Returns

TouchPress<T>

Properties

PropertyModifierTypeDefined in
optionsreadonlyTouchPressOptionscore/touch-press.ts:84

Accessors

current

Get Signature

get current(): TouchPhase;

Defined in: core/touch-press.ts:94

Returns

TouchPhase


held

Get Signature

get held(): boolean;

Defined in: core/touch-press.ts:98

Returns

boolean


target

Get Signature

get target(): T | undefined;

Defined in: core/touch-press.ts:103

The target the current hold started on, if any.

Returns

T | undefined

Methods

reset()

reset(): void;

Defined in: core/touch-press.ts:182

Drop any hold without reporting it (the pointer went away for good).

Returns

void


update()

update(sample: TouchSample<T> | undefined): TouchUpdate<T>;

Defined in: core/touch-press.ts:108

Advance with this frame's measurement (or undefined for no contact).

Parameters

ParameterType
sampleTouchSample<T> | undefined

Returns

TouchUpdate<T>