new Stage()
- Source:
Stage: controls a list of layer groups and their synchronisation.
Methods
addLayerGroup(htmlElement) → {dwv.gui.LayerGroup}
- Source:
Add a layer group to the list.
Parameters:
Name | Type | Description |
---|---|---|
htmlElement |
object | The HTML element of the layer group. |
Returns:
The newly created layer group.
- Type
- dwv.gui.LayerGroup
bindLayerGroups()
- Source:
Bind the layer groups of the stage.
draw()
- Source:
Draw the stage: calls draw on all layer groups.
empty()
- Source:
Empty the layer group list.
getActiveLayerGroup() → {dwv.gui.LayerGroup}
- Source:
Get the active layer group.
Returns:
The layer group.
- Type
- dwv.gui.LayerGroup
getLayerGroup(index) → {dwv.gui.LayerGroup}
- Source:
Get the layer group at the given index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index. |
Returns:
The layer group.
- Type
- dwv.gui.LayerGroup
getLayerGroupWithElementId(id) → {dwv.gui.LayerGroup}
- Source:
Get a layer group from an HTML element id.
Parameters:
Name | Type | Description |
---|---|---|
id |
string | The element id to find. |
Returns:
The layer group.
- Type
- dwv.gui.LayerGroup
getNumberOfLayerGroups() → {number}
- Source:
Get the number of layer groups that form the stage.
Returns:
The number of layer groups.
- Type
- number
getViewLayersByDataIndex(index) → {Array}
- Source:
Get the view layers associated to a data index.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The data index. |
Returns:
The layers.
- Type
- Array
reset()
- Source:
Reset the stage: calls reset on all layer groups.
setBinders(list)
- Source:
Set the layer groups binders.
Parameters:
Name | Type | Description |
---|---|---|
list |
Array | The list of binder objects. |
unbindLayerGroups()
- Source:
Unbind the layer groups of the stage.
(inner) addEventListeners(index, binder)
- Source:
Add event listeners for a given layer group index and binder.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index of the associated layer group. |
binder |
object | The layer binder. |
(inner) getBinderCallback(binder, index) → {function}
- Source:
Get the binder callback function for a given layer group index. The function is created if not yet stored.
Parameters:
Name | Type | Description |
---|---|---|
binder |
object | The layer binder. |
index |
number | The index of the associated layer group. |
Returns:
The binder function.
- Type
- function
(inner) removeEventListeners(index, binder)
- Source:
Remove event listeners for a given layer group index and binder.
Parameters:
Name | Type | Description |
---|---|---|
index |
number | The index of the associated layer group. |
binder |
object | The layer binder. |