Skip to content

@ue-too/board / index / DummyCanvas

クラス: DummyCanvas ​

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:98

No-op implementation of Canvas interface for web worker relay contexts.

Remarks ​

This class is used when an input state machine is configured to relay events to a web worker rather than perform actual canvas operations. The state machine requires a Canvas in its context, but in the relay scenario, no actual canvas operations are needed - events are simply forwarded to the worker thread.

All properties return default/empty values and all methods are no-ops.

参照 ​

DummyKmtInputContext

実装 ​

コンストラクター ​

コンストラクター ​

new DummyCanvas(): DummyCanvas

戻り値 ​

DummyCanvas

プロパティ ​

detached ​

detached: boolean = false

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:108

Whether the canvas is currently detached from the DOM

の実装 ​

Canvas.detached


dimensions ​

dimensions: object

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:103

Combined dimensions and position information

height ​

height: number

position ​

position: Point

width ​

width: number

の実装 ​

Canvas.dimensions


height ​

height: number = 0

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:100

The canvas height in CSS pixels

の実装 ​

Canvas.height


position ​

position: Point

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:101

The top-left position of the canvas in window coordinates

の実装 ​

Canvas.position


setCursor() ​

setCursor: (style) => void = NO_OP

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:102

Sets the CSS cursor style for visual feedback

パラメータ ​

style ​

CursorStyle

戻り値 ​

void

の実装 ​

Canvas.setCursor


tearDown() ​

tearDown: () => void = NO_OP

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:109

Cleanup method to dispose of resources and event listeners

戻り値 ​

void

の実装 ​

Canvas.tearDown


width ​

width: number = 0

定義: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:99

The canvas width in CSS pixels

の実装 ​

Canvas.width