Creates a new stage, layer, background and selection instance
The [[Settings]]
The [[Events]]
The [[History]]
Demonstrates the current active drawing. it's a string value or null.
This property is managing by [[ShapeDrawer]] directly
Readonly backgroundThe background of main layer that contains image and overlay
Background component is a not selectable shape that represents Image and Rect nodes.
The nodes are accessible with background.image and background.overlay APIs
[[https://konvajs.org/api/Konva.Image.html | Image]] and [[ https://konvajs.org/api/Konva.Rect.html | Rect]]
editor.board.background.setImageFromUrl('<url>')
editor.board.background.fill('rgba(0, 0, 0, 0.5)')
editor.board.background.filter({
name: 'Blur',
options: {
blurRadius: 20
}
})
Readonly containerThe html container element which the editor renders into that
Readonly events[[Events]]
Readonly groups[[Groups]]
Readonly history[[History]]
Readonly layerThe main layer that contains all shapes and transformers
[[https://konvajs.org/api/Konva.Layer.html | Layer]]
Readonly selectionThe selection manager components that lets select and manage shapes with UI or API
Selects all shapes
editor.board.selection.selectAll()
Deselects all shapes
editor.board.selection.deselectAll()
Readonly settingsThe settings
Readonly stageThe stage that contains all layers
[[https://konvajs.org/api/Konva.Stage.html | Stage]]
Returns all created shapes except deleted and hidden shpaes
[[ShapeModel]]
Returns all created shapes
[[ShapeModel]]
Adds a new shape to the list of the shapes
Removes a shape from the list of the shapes
Updates list of the shapes
Board class create and controls the main canvas and manages the shapes in the workspace