LayoutLayers

A collection of layers.

Instance Properties

Name Description Access
length number The number of objects in the collection. read-only

Methods

add(
[withProperties])
 → Layer
anyItem(
)
 → Layer
count(
)
 → number
everyItem(
)
 → Layer
firstItem(
)
 → Layer
item(
index)
 → Layer
itemByID(
id)
 → Layer
itemByName(
name)
 → Layer
itemByRange(
from, to)
 → Layer
lastItem(
)
 → Layer
middleItem(
)
 → Layer
nextItem(
obj)
 → Layer
previousItem(
obj)
 → Layer
toSource(
)
 → string
add(
[withProperties])
 → Layer
Creates a new Layer.
withProperties Object Initial values for properties of the new Layer (Optional)
anyItem(
)
 → Layer
Returns any Layer in the collection.
count(
)
 → number
Displays the number of elements in the Layer.
everyItem(
)
 → Layer
Returns every Layer in the collection.
firstItem(
)
 → Layer
Returns the first Layer in the collection.
item(
index)
 → Layer
Returns the Layer with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → Layer
Returns the Layer with the specified ID.
id number The ID.
itemByName(
name)
 → Layer
Returns the Layer with the specified name.
name string The name.
itemByRange(
from, to)
 → Layer
Returns the Layers within the specified range.
from The Layer, index, or name at the beginning of the range. Can accept: Layer, Long Integer or String.
to The Layer, index, or name at the end of the range. Can accept: Layer, Long Integer or String.
lastItem(
)
 → Layer
Returns the last Layer in the collection.
middleItem(
)
 → Layer
Returns the middle Layer in the collection.
nextItem(
obj)
 → Layer
Returns the Layer whose index follows the specified Layer in the collection.
obj Layer The Layer whose index comes before the desired Layer.
previousItem(
obj)
 → Layer
Returns the Layer with the index previous to the specified index.
obj Layer The index of the Layer that follows the desired Layer.
toSource(
)
 → string
Generates a string which, if executed, will return the Layer.