Methods
addLayerGroup(htmlElement) → {LayerGroup}
Add a layer group to the list.
The new layer group will be marked as the active layer group.
Name | Type | Description |
---|---|---|
htmlElement | object | The HTML element of the layer group. |
- Source
The newly created layer group.
- Type:
- 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
fitToContainer()
Fit to container: synchronise the div to world size ratio of the group layers.
- Source
getActiveLayerGroup() → {LayerGroup|undefined}
Get the active layer group.
- Source
The layer group.
- Type:
- LayerGroup |
undefined
getDrawLayersByDataId(dataId) → {Array.<DrawLayer>}
Get the draw layers associated to a data id.
Name | Type | Description |
---|---|---|
dataId | string | The data id. |
- Source
The layers.
- Type:
- Array.<DrawLayer>
getLayerGroup(index) → {LayerGroup|undefined}
Get the layer group at the given index.
Name | Type | Description |
---|---|---|
index | number | The index. |
- Source
The layer group.
- Type:
- LayerGroup |
undefined
getLayerGroupByDivId(id) → {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:
- LayerGroup
getNumberOfLayerGroups() → {number}
Get the number of layer groups that form the stage.
- Source
The number of layer groups.
- Type:
- number
getViewLayersByDataId(dataId) → {Array.<ViewLayer>}
Get the view layers associated to a data id.
Name | Type | Description |
---|---|---|
dataId | string | The data id. |
- Source
The layers.
- Type:
- Array.<ViewLayer>
removeLayerGroup(layerGroup)
Remove a layer group from this stage.
Name | Type | Description |
---|---|---|
layerGroup | LayerGroup | The layer group to remove. |
- Source
removeLayersByDataId(dataId)
Remove all layers for a specific data.
Name | Type | Description |
---|---|---|
dataId | string | The data to remove its layers. |
- Source
reset()
Reset the stage: calls reset on all layer groups.
- Source
setActiveLayerGroup(index)
Set the active layer group.
Name | Type | Description |
---|---|---|
index | number | The layer group index. |
- Source
setBinders(list)
Set the layer groups binders.
Name | Type | Description |
---|---|---|
list | Array | The list of binder objects. |
- Source
setImageSmoothing(flag)
Set the imageSmoothing flag value.
Name | Type | Description |
---|---|---|
flag | boolean | True to enable smoothing. |
- Source
unbindLayerGroups()
Unbind the layer groups of the stage.
- Source