.PolyLinePoints~SmartArray(arropt)

array-like structure used in PolyLinePoints

new SmartArray(arropt)

Parameters:
Name Type Attributes Description
arr Array <optional>

if set, initialized SmartArray will contain these values

Members

first

last

length

get length of the array

Methods

addWithIndex(item, index)

add a new item at the specified index, move all following items

Parameters:
Name Type Description
item

new item that will be added at the specified index

index number

index of this item

append(item)

append an item to the array

Parameters:
Name Type Description
item

new item that will be appended to the array

copy() → {SmartArray}

get a deep copy of this array

Returns:
SmartArray

getItem(index)

get item by index

Parameters:
Name Type Description
index number

index of the item

Returns:
-

contents of the array on the specified index

prepend(item)

prepend an item to the array

Parameters:
Name Type Description
item

new item that will be prepended to the array

remove(index)

remove an item from the array by index

Parameters:
Name Type Description
index number

index of the item that will be removed