Skip to content

@ue-too/board / index / IdleState

類別: IdleState

定義於: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:109

IDLE state - waiting for two-finger touch.

備註

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

建構函式

建構函式

new IdleState(): IdleState

回傳

IdleState

繼承自

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

屬性

_defer

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

定義於: packages/being/dist/interface.d.ts:493

繼承自

TemplateState._defer


_delay

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

定義於: packages/being/dist/interface.d.ts:492

繼承自

TemplateState._delay


_eventGuards

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

定義於: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:137

覆寫了

TemplateState._eventGuards


_eventReactions

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

定義於: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:115

覆寫了

TemplateState._eventReactions


_guards

protected _guards: Guard<TouchContext, "touchPointsCount">

定義於: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:131

覆寫了

TemplateState._guards

存取器

delay

Getter 簽章

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

定義於: packages/being/dist/interface.d.ts:498

回傳

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

繼承自

TemplateState.delay


eventGuards

Getter 簽章

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

定義於: packages/being/dist/interface.d.ts:496

回傳

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

繼承自

TemplateState.eventGuards


eventReactions

Getter 簽章

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

定義於: packages/being/dist/interface.d.ts:497

回傳

EventReactions<EventPayloadMapping, Context, States, EventOutputMapping>

繼承自

TemplateState.eventReactions


guards

Getter 簽章

get guards(): Guard<Context>

定義於: packages/being/dist/interface.d.ts:495

回傳

Guard<Context>

繼承自

TemplateState.guards


handlingEvents

Getter 簽章

get handlingEvents(): keyof EventPayloadMapping[]

定義於: packages/being/dist/interface.d.ts:494

回傳

keyof EventPayloadMapping[]

繼承自

TemplateState.handlingEvents

方法

beforeExit()

beforeExit(context, stateMachine, to): void

定義於: packages/being/dist/interface.d.ts:500

參數

context

TouchContext

stateMachine

StateMachine<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>

to

"TERMINAL" | TouchStates

回傳

void

繼承自

TemplateState.beforeExit


handles()

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

定義於: packages/being/dist/interface.d.ts:501

型別參數

K

K extends string

參數

args

EventArgs<TouchEventMapping, K>

context

TouchContext

stateMachine

StateMachine<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>

回傳

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

繼承自

TemplateState.handles


touchend()

touchend(context, payload): void

定義於: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:163

參數

context

TouchContext

payload

TouchEventPayload

回傳

void


touchstart()

touchstart(context, payload): void

定義於: packages/board/src/input-interpretation/input-state-machine/touch-input-state-machine.ts:159

參數

context

TouchContext

payload

TouchEventPayload

回傳

void


uponEnter()

uponEnter(context, stateMachine, from): void

定義於: packages/being/dist/interface.d.ts:499

參數

context

TouchContext

stateMachine

StateMachine<TouchEventMapping, TouchContext, TouchStates, TouchInputEventOutputMapping>

from

"INITIAL" | TouchStates

回傳

void

繼承自

TemplateState.uponEnter