SelectionAPI.nodes

Currently selected layers and shapes.

SelectionAPI.nodes property

Currently selected layers and shapes.

Signature:

nodes: ReadonlyArray<Layer | Shape>;

Remarks

Assigning to this property replaces the current selection. Pass an empty array to clear the selection.

Example

// Read the current selection
const selectedNodes = creator.selection.nodes;

// Set the selection
creator.selection.nodes = [layer1, shape2];

// Clear the selection
creator.selection.nodes = [];
Last updated: October 8, 2026 at 10:45 AMEdit this page