@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.
備註
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.
參閱
實作
建構函式
建構函式
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
實作了
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
實作了
height
height:
number=0
定義於: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:100
The canvas height in CSS pixels
實作了
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
實作了
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
回傳
void
實作了
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
實作了
width
width:
number=0
定義於: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:99
The canvas width in CSS pixels