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