shapeIndex(shape, [new_index])
Class: ShapeContainer.
Description:
Gets an index of a specified Shape object or sets a new index making the Shape change its layer index position.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
Shape object in question |
|
|
|
number |
The new index to assign to the |
Returns:
Returns an index of the Shape or -1 if only first argument is passed, or this component index if new_index is passed.
Type: number
Throws:
- TypeError: When invalid argument type is passed as a
shape argument.- Error: When the shape is not added to this component while attempting to change its index to
new_index.