Skip to content

@ue-too/board / index / TouchEventParser

Interface: TouchEventParser ​

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:19

Interface for touch event parsers.

Remarks ​

Touch event parsers bridge DOM TouchEvents and the touch state machine. They provide granular control over which gesture types are enabled.

Properties ​

disabled ​

disabled: boolean

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:21

Whether all touch input is disabled


stateMachine? ​

readonly optional stateMachine: TouchInputStateMachine

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:42

The state machine this parser dispatches into, when the implementation exposes one. Optional so existing external parser implementations remain valid, but note this member is typed to the full TouchInputStateMachine — unlike KMTEventParser.stateMachine's minimal { happens } contract, an external implementation is more likely to need adjustment to satisfy this member's shape. Intended for tooling/introspection — dispatch through the parser, not through this reference.

Methods ​

attach() ​

attach(canvas): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:27

Attaches to a new canvas element

Parameters ​

canvas ​

HTMLCanvasElement

Returns ​

void


disable() ​

disable(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:29

Disables the parser; the event listeners are still attached just not processing any events

Returns ​

void


enable() ​

enable(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:31

Enables the parser

Returns ​

void


setUp() ​

setUp(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:23

Initializes event listeners

Returns ​

void


tearDown() ​

tearDown(): void

Defined in: packages/board/src/input-interpretation/raw-input-parser/vanilla-touch-event-parser.ts:25

Removes event listeners and cleans up

Returns ​

void