Optionaloptions: TInkCanvasOptionsEvent bus for subscribing to canvas lifecycle and content events.
OptionalinfoServer API information (version, etc.) loaded on first connection.
DOM layer manager handling rendering, UI, and modal elements.
Logger instance for this canvas.
Derived, UI-oriented canvas state — see TCanvasConnectionState.
Listen to event.addConnectionStateChangedListener for change notifications.
ProtectedclearForce label fully inactive regardless of how many startOperation calls are pending.
For level-triggered signals with a single external "done" event (e.g. the client's
idle event) rather than one end call per start call.
Mark one occurrence of label as finished. Must be paired with a prior startOperation.
OptionalrequestedMimeTypes: string[]Whether label is currently active (at least one unmatched startOperation call).
ProtectedmanageOnly relevant for WebSocket-backed canvas; other variants never call this.
ProtectedmanageThe client's idle event only fires in response to an explicit
client.waitForIdle() call (a request/response pair, not a push notification) — it does
NOT fire automatically after every addStrokes()/transform/etc. So it cannot be used to end
a "Recognizing" operation reliably. This only preserves the public event.emitIdle passthrough
for consumers who call waitForIdle() themselves.
ProtectedmarkCalled once the canvas has connected to its backend for the first time.
Mark label as active. Prefer trackOperation unless the operation isn't promise-shaped.
ProtectedstartProtectedstopRun fn, marking label as an active operation for the duration (shown on the canvas
state badge tooltip). Safe against overlapping/concurrent calls with the same or different
labels, and against fn throwing (the operation is always ended).
Remarks
InkCanvas is the core canvas variant focused on freeform ink input, rendering, and recognition. It provides a rich API for managing strokes, exports, and canvas state, and serves as the foundation for more specialized canvas variants.
Key features include:
The InkCanvas is designed for extensibility, allowing developers to override core components like the client or input grabber for custom behavior.