LayoutRectangles

A collection of rectangles.

Instance Properties

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

Methods

add(
[layer] ​[, at], reference ​[, withProperties])
 → Rectangle
anyItem(
)
 → Rectangle
count(
)
 → number
everyItem(
)
 → Rectangle
firstItem(
)
 → Rectangle
item(
index)
 → Rectangle
itemByID(
id)
 → Rectangle
itemByName(
name)
 → Rectangle
itemByRange(
from, to)
 → Rectangle
lastItem(
)
 → Rectangle
nextItem(
obj)
 → Rectangle
previousItem(
obj)
 → Rectangle
toSource(
)
 → string
add(
[layer] ​[, at=LocationOptions.UNKNOWN], reference ​[, withProperties])
 → Rectangle
Creates a new Rectangle
layer Layer The layer on which to create the Rectangle. (Optional)
at LocationOptions The location at which to insert the Rectangle relative to the reference object or within the container object. (Optional)
reference The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem. (Optional)
withProperties Object Initial values for properties of the new Rectangle (Optional)
anyItem(
)
 → Rectangle
Returns any Rectangle in the collection.
count(
)
 → number
Displays the number of elements in the Rectangle.
everyItem(
)
 → Rectangle
Returns every Rectangle in the collection.
firstItem(
)
 → Rectangle
Returns the first Rectangle in the collection.
item(
index)
 → Rectangle
Returns the Rectangle with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → Rectangle
Returns the Rectangle with the specified ID.
id number The ID.
itemByName(
name)
 → Rectangle
Returns the Rectangle with the specified name.
name string The name.
itemByRange(
from, to)
 → Rectangle
Returns the Rectangles within the specified range.
from The Rectangle, index, or name at the beginning of the range. Can accept: Rectangle, Long Integer or String.
to The Rectangle, index, or name at the end of the range. Can accept: Rectangle, Long Integer or String.
lastItem(
)
 → Rectangle
Returns the last Rectangle in the collection.
middleItem(
)
 → Rectangle
Returns the middle Rectangle in the collection.
nextItem(
obj)
 → Rectangle
Returns the Rectangle whose index follows the specified Rectangle in the collection.
obj Rectangle The Rectangle whose index comes before the desired Rectangle.
previousItem(
obj)
 → Rectangle
Returns the Rectangle with the index previous to the specified index.
obj Rectangle The index of the Rectangle that follows the desired Rectangle.
toSource(
)
 → string
Generates a string which, if executed, will return the Rectangle.