Hierarchy
-
IObservable<View.Layer>
- Layer
Index
Properties
Tag
Readonly id
The unique id of the Layer
Readonly name
The human-readable name of the Layer
Readonly toggled
Whether this Layer toggled on or off. If toggled off, this Layer's objects are hidden.
Methods
subscribe
-
Subscribe to changes on this object. When this observable detects a change, the
observer
provided will be called with the data associated with this observable.Parameters
-
observer: IObserver<View.Layer> | ObserverCallback<View.Layer>
Returns ISubscription
A subscription that can be used to remove the subscribed observer.
-
toggle
-
Toggle this Layer's state to
active
.Parameters
-
Optional active: undefined | false | true
Whether this Layer toggled on or off. If
active
is undefined, the state is flipped.
Returns Promise<void>
-
waitUntil
-
Wait for a specific condition on this object to be met. When this observable detects a change, the
condition
provided will be called. When thecondition
returns true, the returned Promise will be resolved.Parameters
-
condition: ICondition<View.Layer> | ConditionCallback<View.Layer>
Returns Promise<View.Layer>
A promise that is resolved when
condition
returns true. -
A subset of the Tag namespace's functionality to manipulate Tags on this layer.