Edit in GitHubLog an issue

@add-on-hlapi-sdk / ArtboardList

Class: ArtboardList

ArtboardList represents an ordered list of ArtboardNodes arranged in a timeline sequence, where they are called "scenes." All items in the list are children of a single PageNode.

ArtboardList also provides APIs for adding/removing artboards from the page. ArtboardList is never empty: it is illegal to remove the last remaining artboard from the list.

Hierarchy

Table of contents

Accessors

Methods

Accessors

first

get first(): undefined | T

First item in this list, or undefined if list is empty.

Returns

undefined | T

Inherited from

ReadOnlyItemList.first


last

get last(): undefined | T

Last item in this list, or undefined if list is empty.

Returns

undefined | T

Inherited from

ReadOnlyItemList.last


length

get length(): number

Number of items in this list.

Returns

number

Inherited from

ReadOnlyItemList.length

Methods

[iterator]

[iterator](): Iterator<ArtboardNode, any, undefined>

Iterates over all the items in this list. Mutations that occur mid-iteration are not reflected by the iterator.

Returns

Iterator<ArtboardNode, any, undefined>

Inherited from

ReadOnlyItemList.[iterator]


addArtboard

addArtboard(): ArtboardNode

Create a new artboard and add it to the end of the list. The artboard size is the same as others on this page. The artboard background is set to default fill color DEFAULT_ARTBOARD_FILL_COLOR.

Returns

ArtboardNode

the newly added artboard.


item

item(index): undefined | ArtboardNode

Returns item at the given index, or undefined if index is out of range.

Parameters

NameTypeDescription
index
number
Zero-based index

Returns

undefined | ArtboardNode

Inherited from

ReadOnlyItemList.item


remove

remove(...items): void

Remove the items from the list.

Throws

An error if any of the items are not in the list or if removing the items would cause the list to be empty. If one of these errors occurs, the list is not modified.

Parameters

NameType
...items

Returns

void


toArray

toArray(): readonly ArtboardNode[]

All items in the list, as a static array. Mutations that occur later are not reflected in an array returned earlier.

Returns

readonly ArtboardNode[]

Inherited from

ReadOnlyItemList.toArray

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.