SVGNode

SVGNode

An SVG graphic layer on the canvas.

Contains the raw SVG string and supports positioning, sizing, rotation, and visibility.

Methods & Properties

The name of the node displayed in the layers panel.

Whether the node is visible on the canvas.

Whether the node is locked for editing.

SVG markup content. Supported by SVGNode.

Rotation angle in degrees.

Opacity of the node, from 0 (fully transparent) to 1 (fully opaque).

Positioning behavior of the node. - "relative": Default for nodes in stack/grid layouts - "absolute": Positioned relative to parent - "fixed": Positioned relative to viewport - "sticky": Sticks to viewport edges when scrolling

Distance from top edge when using absolute/fixed positioning.

Distance from right edge when using absolute/fixed positioning.

Distance from bottom edge when using absolute/fixed positioning.

Distance from left edge when using absolute/fixed positioning.

Center anchor horizontal position as percentage (e.g. "50%").

Center anchor vertical position as percentage (e.g. "50%").

Width of the node.

Height of the node.

Remove this node from the canvas tree.

Select this node on the canvas.

Clone this node, creating a duplicate in the canvas tree.

Set the attributes of this node.

Get the bounding box of this node.

Pans and zooms the viewport to center the node.

Navigate to this node.

Get the parent of this node in the canvas tree.

Get the children of this node in the canvas tree.

Get descendants of this node that match the given type.

Get the descendants of this node that support attribute.

Get the descendants of this node that have attribute set to a non-null value.

Walk this node and its descendants recursively.

Get plugin data by key.

Set plugin data by key.

Get all plugin data keys stored on this node.