@add-on-hlapi-sdk / ArtboardNode
Class: ArtboardNode
An ArtboardNode represents an artboard object in the scenegraph. All user visual content must be contained on an artboard.
When multiple artboards exist on a page, the artboards represent "scenes" in a linear timeline sequence.
Hierarchy
↳
ArtboardNode
Implements
Table of contents
Accessors
- absoluteRotation
- absoluteTransform
- allChildren
- blendMode
- children
- fill
- height
- locked
- opacity
- parent
- relativeRotation
- relativeTransform
- strokes
- translateX
- translateY
- type
- width
Methods
Accessors
absoluteRotation
• get
absoluteRotation(): number
The node's absolute (global) rotation angle in degrees – includes any cumulative rotation from the node's parent containers.
Returns
number
Inherited from
ContainerNode.absoluteRotation
• set
absoluteRotation(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
ContainerNode.absoluteRotation
absoluteTransform
• get
absoluteTransform(): mat2d
The node's absolute (global) transform matrix.
Returns
Inherited from
ContainerNode.absoluteTransform
allChildren
• get
allChildren(): Readonly
<Iterable
<Node
>>
Returns a read-only list of all children of the node. General-purpose content containers such as ArtboardNode or
GroupNode also provide a mutable children list. Other nodes with a more specific structure can
hold children in various discrete "slots"; this allChildren
list includes all such children and reflects their
overall display z-order.
Returns
Readonly
<Iterable
<Node
>>
Inherited from
ContainerNode.allChildren
blendMode
• get
blendMode(): BlendModeValue
Blend mode determines how a node is composited onto the content below it. The default value is normal for most nodes, and passThrough for GroupNodes.
Returns
Inherited from
ContainerNode.blendMode
• set
blendMode(value
): void
Parameters
Name | Type |
---|---|
value |
Returns
void
Inherited from
ContainerNode.blendMode
children
• get
children(): ItemList
<Node
>
The node's children. Use the methods on this ItemList object to get, add, and remove children.
Returns
Inherited from
ContainerNode.children
fill
• get
fill(): Fill
The background fill of the artboard.
Returns
• set
fill(fill
): void
Parameters
Name | Type |
---|---|
fill |
Returns
void
height
• get
height(): number
The height of the artboard.
Returns
number
Implementation of
locked
• get
locked(): boolean
The node's lock/unlock state. Locked nodes are excluded from the selection (see selection), and cannot be edited by the user unless they are unlocked first.
Returns
boolean
Inherited from
ContainerNode.locked
• set
locked(locked
): void
Parameters
Name | Type |
---|---|
locked | boolean |
Returns
void
Inherited from
ContainerNode.locked
opacity
• get
opacity(): number
The node's opacity, from 0.0 to 1.0
Returns
number
Inherited from
ContainerNode.opacity
• set
opacity(opacity
): void
Parameters
Name | Type |
---|---|
opacity | number |
Returns
void
Inherited from
ContainerNode.opacity
parent
• get
parent(): undefined
| PageNode
The node's parent. Undefined if the node is an orphan.
Returns
undefined
| PageNode
Overrides
ContainerNode.parent
relativeRotation
• get
relativeRotation(): number
The node's local rotation value in degrees, relative to its parent's axes. Modifying this value will also adjust the node's x & y translation such that the node's center is in the same location after the rotation – i.e. this setter rotates the node about its bounding box's center, not its origin.
Returns
number
Inherited from
ContainerNode.relativeRotation
• set
relativeRotation(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
ContainerNode.relativeRotation
relativeTransform
• get
relativeTransform(): mat2d
The node's transform matrix relative to its parent.
Returns
Inherited from
ContainerNode.relativeTransform
strokes
• get
strokes(): ItemList
<Stroke
>
Any strokes(s) on the shape. Use the methods on this ItemList object to get, add, and remove strokes.
Returns
Implementation of
translateX
• get
translateX(): number
The translation of the node along its parent's x-axis.
Returns
number
Inherited from
ContainerNode.translateX
• set
translateX(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
ContainerNode.translateX
translateY
• get
translateY(): number
The translation of the node along its parent's y-axis.
Returns
number
Inherited from
ContainerNode.translateY
• set
translateY(value
): void
Parameters
Name | Type |
---|---|
value | number |
Returns
void
Inherited from
ContainerNode.translateY
type
• get
type(): SceneNodeTypeValueID
The node's type.
Returns
Inherited from
ContainerNode.type
width
• get
width(): number
The width of the artboard.
Returns
number
Implementation of
Methods
removeFromParent
▸ removeFromParent(): void
Removes the node from its parent - for a basic ContainerNode, this is equivalent to node.parent.children.remove(node)
.
For nodes with other slots, removes the child from whichever slot it resides in, if possible. Throws if the slot does
not support removal. Also throws if node is the artwork root. No-op if node is already an orphan.
Returns
void
Inherited from
ContainerNode.removeFromParent