The current global hider of these layers
The current global hider of these layers
Get the symbol which is attached to an item prior to its removal. If an item is removed, the current index of the item is set on the item with this symbol.
The key by which to check uniqueness against. undefined if no uniqueness constraint is set.
A symbol to describe the local z index of a layer. The local z index must not equal the layers z index, but is always consistent in comparison to the neighbouring layers. If a layer is moved other then by z index, the collection ensures consistency by setting a new local z index if needed.
Protected _checkPrivate _ensureEnsures the local z index is consistent with the neighbours of a given layer. e.g. the layer on elower must have a lower or equal zIndex and the one higher a higher or equal zIndex.
Private _findZIndexPrivate _listenProtected _moveProtected _removeinternal remove function, to remove an item from the collection, does not raise an event.
returns the index of the removed item or -1 if the item has not been found.
Private _zPrivate
This is callback for a layers zIndex changed. It reevaluates the array given the new zIndex an moves the specified layer to its new location determined by findeZIndexPosition or the end of the array failing that.
Adds a layer to the collection. Can optionally be passed an index at which to insert the layer. The layer locale will be set to the same locale of the layerCollection. This will trigger a forceRedraw of the layer if the layer locale is different and the layer is locale aware.
Optional index: numberreturns the layer index or null, if the layers name is not unique
Returns an item at index.
Returns an item identified by the unique constraint key. Returns null, if there is no uniqueness constraint.
the value to test against. does a shallow comparison, if the passed a non-atomic value
Equivalent to Array.prototype.includes
Returns the index of an item or -1 if it is not part of this collection
Lowers an item within the array
Optional steps: number = 1an integer number to lower by
the new index of the item
Moves an item to a provided index
the new index of the item
Raises an item within the array
Optional steps: number = 1an integer number to lower by
the new index of the item
Removes an item from the collection
Static fromCreates a LayerCollection from an iterable of layers, such as an Array.
Protected _arrayPrivate _globalThe global hider for this collection.
Private _layerPrivate _localeLocale for this layerCollection, will be synchronized by the vcsApp, if part of an vcsApp. This Locale will be set on all Member Layers. On setting the Locale this will trigger a reload of all locale aware layers.
Private _zEvent raised if an item is added. Is passed the added item.
The exclusive manager for this collection. Layers within this collection are automatically added and tracked.
Event raised if an item is relocated within the collection. Is passed the moved item.
Event raised if an item is removed. Is passed the removed item.
Event raised, when a layer of this collection changes its state. Passed the layer.
Generated using TypeDoc
A collection of layers. Manages rendering order and layer exclusivity. Emits state changes for convenience. Passed to Map for layers available to said map. Layers must have unique names.