Skip to content

@ue-too/board / DummyCanvas

Class: DummyCanvas

Defined in: 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.

See

DummyKmtInputContext

Implements

Constructors

Constructor

new DummyCanvas(): DummyCanvas

Returns

DummyCanvas

Properties

detached

detached: boolean = false

Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:108

Whether the canvas is currently detached from the DOM

Implementation of

Canvas.detached


dimensions

dimensions: object

Defined in: 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

Implementation of

Canvas.dimensions


height

height: number = 0

Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:100

The canvas height in CSS pixels

Implementation of

Canvas.height


position

position: Point

Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:101

The top-left position of the canvas in window coordinates

Implementation of

Canvas.position


setCursor()

setCursor: (style) => void = NO_OP

Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:102

Sets the CSS cursor style for visual feedback

Parameters

style

CursorStyle

Returns

void

Implementation of

Canvas.setCursor


tearDown()

tearDown: () => void = NO_OP

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

Cleanup method to dispose of resources and event listeners

Returns

void

Implementation of

Canvas.tearDown


width

width: number = 0

Defined in: packages/board/src/input-interpretation/input-state-machine/kmt-input-context.ts:99

The canvas width in CSS pixels

Implementation of

Canvas.width