Skip to content

@ue-too/board / IdleState

Class: IdleState

Defined in: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:109

IDLE state - waiting for two-finger touch.

Remarks

This state handles touch lifecycle but only transitions to PENDING when exactly two touches are active. Single touches and three+ touches are ignored.

Guard Condition: Transitions to PENDING only when getCurrentTouchPointsCount() === 2. This ensures the state machine only handles two-finger gestures.

Extends

Constructors

Constructor

new IdleState(): IdleState

Returns

IdleState

Inherited from

TemplateState< TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping >.constructor

Properties

_defer

protected _defer: Defer<TouchContext, TouchEventMapping, TouchStates, TouchInputEventOutputMapping> | undefined

Defined in: packages/being/dist/interface.d.ts:492

Inherited from

TemplateState._defer


_delay

protected _delay: Delay<TouchContext, TouchEventMapping, TouchStates, TouchInputEventOutputMapping> | undefined

Defined in: packages/being/dist/interface.d.ts:491

Inherited from

TemplateState._delay


_eventGuards

protected _eventGuards: Partial<EventGuards<TouchEventMapping, TouchStates, TouchContext, typeof _guards>>

Defined in: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:137

Overrides

TemplateState._eventGuards


_eventReactions

protected _eventReactions: EventReactions<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>

Defined in: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:115

Overrides

TemplateState._eventReactions


_guards

protected _guards: Guard<TouchContext, "touchPointsCount">

Defined in: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:131

Overrides

TemplateState._guards

Accessors

delay

Get Signature

get delay(): Delay<Context, EventPayloadMapping, States, EventOutputMapping> | undefined

Defined in: packages/being/dist/interface.d.ts:497

Returns

Delay<Context, EventPayloadMapping, States, EventOutputMapping> | undefined

Inherited from

TemplateState.delay


eventGuards

Get Signature

get eventGuards(): Partial<EventGuards<EventPayloadMapping, States, Context, Guard<Context>>>

Defined in: packages/being/dist/interface.d.ts:495

Returns

Partial<EventGuards<EventPayloadMapping, States, Context, Guard<Context>>>

Inherited from

TemplateState.eventGuards


eventReactions

Get Signature

get eventReactions(): EventReactions<EventPayloadMapping, Context, States, EventOutputMapping>

Defined in: packages/being/dist/interface.d.ts:496

Returns

EventReactions<EventPayloadMapping, Context, States, EventOutputMapping>

Inherited from

TemplateState.eventReactions


guards

Get Signature

get guards(): Guard<Context>

Defined in: packages/being/dist/interface.d.ts:494

Returns

Guard<Context>

Inherited from

TemplateState.guards


handlingEvents

Get Signature

get handlingEvents(): keyof EventPayloadMapping[]

Defined in: packages/being/dist/interface.d.ts:493

Returns

keyof EventPayloadMapping[]

Inherited from

TemplateState.handlingEvents

Methods

beforeExit()

beforeExit(context, stateMachine, to): void

Defined in: packages/being/dist/interface.d.ts:499

Parameters

context

TouchContext

stateMachine

StateMachine<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>

to

"TERMINAL" | TouchStates

Returns

void

Inherited from

TemplateState.beforeExit


handles()

handles<K>(args, context, stateMachine): EventResult<TouchStates, K extends "touchmove" ? TouchInputEventOutputMapping[K<K>] : void>

Defined in: packages/being/dist/interface.d.ts:500

Type Parameters

K

K extends string

Parameters

args

EventArgs<TouchEventMapping, K>

context

TouchContext

stateMachine

StateMachine<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>

Returns

EventResult<TouchStates, K extends "touchmove" ? TouchInputEventOutputMapping[K<K>] : void>

Inherited from

TemplateState.handles


touchend()

touchend(context, payload): void

Defined in: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:163

Parameters

context

TouchContext

payload

TouchEventPayload

Returns

void


touchstart()

touchstart(context, payload): void

Defined in: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:159

Parameters

context

TouchContext

payload

TouchEventPayload

Returns

void


uponEnter()

uponEnter(context, stateMachine, from): void

Defined in: packages/being/dist/interface.d.ts:498

Parameters

context

TouchContext

stateMachine

StateMachine<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>

from

"INITIAL" | TouchStates

Returns

void

Inherited from

TemplateState.uponEnter