Class: LayerSliderModel

Tools.LayerSlider LayerSliderModel

LayerSliderModel

new LayerSliderModel()

modules/tools/layerSlider/model.js, line 46
todo
Properties:
Name Type Default Description
layerIds Array [ the configured layer with their ids and titles.
timeInterval number 2000 Time interval.
title * null The title of the currently selected layer.
progressBarWidth number 10 The Width of the progress bar.
activeLayer object {layerId: ""} The Active layer.
windowsInterval * null the Windows Interval used to iterate through the layers.
renderToWindow boolean true Flag that shows if tool renders to window.
glyphicon string "glyphicon-film" Glyphicon.
sliderType String "player" Slidertype. "player" or "handle".
dataSliderMin String "0" Data slider min. Used for slider input.
dataSliderMax String "" Data slider max. Used for slider input.
dataSliderTicks String "" Data slider ticks. Show the positions of the layers in the slider. Used for slider input.
Fires:
Listens to Events:

Extends

Methods

addLayerModel(layerId){void}

modules/tools/layerSlider/model.js, line 209
Adds the layer model briefly to the model to run prepareLayerObject and then removes the model again.
Name Type Description
layerId string Id of the layer
Fires:

backwardLayer(){void}

modules/tools/layerSlider/model.js, line 306
Finds the previous index in the array in a loop.

checkIfAllLayersAvailable(layers){object}

modules/tools/layerSlider/model.js, line 340
Checks if all layers that the layerSlider should use are also defined and have a title attribute.
Name Type Description
layers Array.<object> Configuration of the layers from config.json
Fires:
Returns:
Layer oder undefined

checkIfLayermodelExist(layerIds){void}

modules/tools/layerSlider/model.js, line 195
Checks if the layer model already exists.
Name Type Description
layerIds Array.<object> Configuration of the layers from config.json
Fires:

checkSliderType(sliderType){void}

modules/tools/layerSlider/model.js, line 68
Checks the slider type and starts the specific functions.
Name Type Description
sliderType String type of slider. Possible values are "player" or "handle".

dragHandle(index){void}

modules/tools/layerSlider/model.js, line 97
Drags the handle and shows the corresponding layer with its transparency.
Name Type Description
index Number Index of handle position.

forwardLayer(){void}

modules/tools/layerSlider/model.js, line 322
Finds the next index in the array in a loop.

getActiveIndex(){integer}

modules/tools/layerSlider/model.js, line 249
Finds the index in the layerIds array to the activeLayerId or returns -1.
Returns:
Index im Array mit activeLayerId.

getLayerIdFromIndex(index, mode){String}

modules/tools/layerSlider/model.js, line 113
Gets the layerId from the given index.
Name Type Description
index Number Index of handle position.
mode String optional Mode. Indicates which layer should be taken.
Returns:
layerId.

getPositionFromValue(index, mode){Number}

modules/tools/layerSlider/model.js, line 127
Calculates the position of the layer, based on the handle position.
Name Type Description
index Number Index of handle position.
mode String optional Mode. Indicates which layer should be taken.
Returns:
position of layer in "layerIds"

initHandle(){void}

modules/tools/layerSlider/model.js, line 84
Initializes the handle functionality.

prepareSliderTicks(layerIds){String}

modules/tools/layerSlider/model.js, line 169
Prepares the slider ticks based on the layerIds array.
Name Type Description
layerIds Array.<Object> Layer ids.
Returns:
Slider ticks configuration for bootstrap-slider.

reset(){void}

modules/tools/layerSlider/model.js, line 184
Resets the tool.

sendModification(layerId, status, transparency){void}

modules/tools/layerSlider/model.js, line 235
Triggers the new visibility over the radio
Name Type Description
layerId string layerId
status boolean Visibility true / false
transparency Number Transparency of layer.

setActiveIndex(index){void}

modules/tools/layerSlider/model.js, line 260
Finds the activeLayerId based on the index and initiates storage.
Name Type Description
index integer Index in layerIds.

setActiveLayer(value){void}

modules/tools/layerSlider/model.js, line 420
Setter for activeLayerId.
Name Type Description
value object activeLayer

setDataSliderMax(value){void}

modules/tools/layerSlider/model.js, line 429
Setter for attribute "dataSliderMax".
Name Type Description
value String Value

setDataSliderTicks(value){void}

modules/tools/layerSlider/model.js, line 438
Setter for attribute "dataSliderTicks".
Name Type Description
value String Value

inherited setGlyphicon(value){void}

modules/core/modelList/item.js, line 69
Setter for glyphicon
Name Type Description
value String Glyphicon

inherited setId(value){void}

modules/core/modelList/item.js, line 34
Setter for id
Name Type Description
value String Id

inherited setIsActive(value){void}

modules/core/modelList/tool/model.js, line 129
Activates or deactivates tool
Name Type Description
value Boolean Flag if tool is active

setIsCollapsed(value){void}

modules/tools/layerSlider/model.js, line 360
Setter for isCollapsed.
Name Type Description
value boolean isCollapsed

setIsCurrentWin(value){void}

modules/tools/layerSlider/model.js, line 369
Setter for isCurrentWin.
Name Type Description
value boolean isCurrentWin

inherited setIsInThemen(value){void}

modules/core/modelList/item.js, line 78
Setter for isInThemen
Name Type Description
value Boolean Flag if item is in themen

inherited setIsVisibleInMenu(value){void}

modules/core/modelList/item.js, line 105
Setter for setIsVisibleInMenu
Name Type Description
value Boolean Flag if item is visible in menu

inherited setIsVisibleInTree(value){void}

modules/core/modelList/item.js, line 96
Setter for isVisibleInTree
Name Type Description
value Boolean Flag if item is visible in layertree

setLayerIds(value){void}

modules/tools/layerSlider/model.js, line 378
Setter for layerIds.
Name Type Description
value Array.<object> layerIds

inherited setLevel(value){void}

modules/core/modelList/item.js, line 87
Setter for level
Name Type Description
value String Level

inherited setName(value){void}

modules/core/modelList/item.js, line 52
Setter for name
Name Type Description
value String Name

inherited setParentId(value){void}

modules/core/modelList/item.js, line 43
Setter for parentId
Name Type Description
value String ParentId

setProgressBarWidth(layerIds){void}

modules/tools/layerSlider/model.js, line 405
Setter for progressBarWidth.
Name Type Description
layerIds Array.<object> layerIds zum Ermitteln der width

setTimeInterval(value){void}

modules/tools/layerSlider/model.js, line 396
Setter for timeInterval.
Name Type Description
value integer timeInterval

setTitle(value){void}

modules/tools/layerSlider/model.js, line 387
Setter for title.
Name Type Description
value string title

inherited setType(value){void}

modules/core/modelList/item.js, line 60
Setter for type
Name Type Description
value String Type

setWindowsInterval(func, autorefreshInterval){void}

modules/tools/layerSlider/model.js, line 271
Setter of the Windows interval. Binds to this.
Name Type Description
func function Function to be executed in this
autorefreshInterval integer Interval in ms

showLayer(layerId, transparency){void}

modules/tools/layerSlider/model.js, line 143
Modificates the layers visibility and transparency based on the handle position.
Name Type Description
layerId String Layer id.
transparency Number transparency based on the handle position.

startInterval(){void}

modules/tools/layerSlider/model.js, line 279
Starts the Windows interval once.

stopInterval(){void}

modules/tools/layerSlider/model.js, line 293
Stops the windows interval.

inherited superChangeLang(){Void}

modules/core/modelList/tool/model.js, line 113
change language - sets or translates the name of this tool, if property i18nextTranslate is no function. If name is defined in config.json, the name is not translated else property nameTranslationKey is used.

toggleLayerVisibility(activeLayerId){void}

modules/tools/layerSlider/model.js, line 220
Determines the visibility of the layerIds
Name Type Description
activeLayerId string Id des activeLayer.