Edit in GitHubLog an issue

Layers

A collection of layers.

Instance

Read Only

Number length

The number of objects in the collection.

Methods

Layer add( Object withProperties )

Creates a new Layer.

Parameters

TypeNameDescription
Object
withProperties
Initial values for properties of the new Layer (Optional)

Number count()

Displays the number of elements in the Layer.


Layer item( Mixed index )

Returns the Layer with the specified index or name.

Parameters

TypeNameDescription
Mixed
index
The index or name. Can accept: Long Integer or String.

Layer itemByName( String name )

Returns the Layer with the specified name.

Parameters

TypeNameDescription
String
name
The name.

Layer itemByID( Number id )

Returns the Layer with the specified ID.

Parameters

TypeNameDescription
Number
id
The ID.

Layer itemByRange( Mixed from, Mixed to )

Returns the Layers within the specified range.

Parameters

TypeNameDescription
Mixed
from
The Layer, index, or name at the beginning of the range. Can accept: Layer, Long Integer or String.
Mixed
to
The Layer, index, or name at the end of the range. Can accept: Layer, Long Integer or String.

Layer firstItem()

Returns the first Layer in the collection.


Layer lastItem()

Returns the last Layer in the collection.


Layer middleItem()

Returns the middle Layer in the collection.


Layer previousItem( Layer obj )

Returns the Layer with the index previous to the specified index.

Parameters

TypeNameDescription
Layer
obj
The index of the Layer that follows the desired Layer.

Layer nextItem( Layer obj )

Returns the Layer whose index follows the specified Layer in the collection.

Parameters

TypeNameDescription
Layer
obj
The Layer whose index comes before the desired Layer.

Layer anyItem()

Returns any Layer in the collection.


Layer everyItem()

Returns every Layer in the collection.


String toSource()

Generates a string which, if executed, will return the Layer.


Layer []( Number index )

Returns the Layer with the specified index.

Parameters

TypeNameDescription
Number
index
The index.
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.