OMD Documentation

omdCanvas

The omdCanvas class is the core component for creating and managing an interactive 2D drawing surface. It provides the primary API for all canvas operations, including drawing and managing strokes, handling user input, and orchestrating various features like tools, a toolbar, and focus frames.

Class Definition

export class omdCanvas

Constructor

new omdCanvas(container, [options])

Creates a new omdCanvas instance within a specified container element.

Properties

Public Methods

Stroke Management

Selection

Coordinate Conversion

Exporting

Canvas Management

Event Handling (Pub/Sub)

Emitted Events

The omdCanvas is an event emitter. You can listen for these events using the on() method.

↑ Top