Class: TreeModel

Searchbar.Tree TreeModel

TreeModel

new TreeModel(config)

modules/searchbar/tree/model.js, line 25
Name Type Description
config object Config parameters from config.json for searching in layer tree.
Properties:
Name Type Default Description
inUse boolean false todo
minChars number 3 Minimum number of characters to start the search.
layers Array.<object> [ todo
nodes Array.<object> [ todo
Fires:
Listens to Events:

Extends

Methods

controlListeningToSearchbar(value){void}

modules/searchbar/tree/model.js, line 50
Deactivates the topic search if the obliqueMap is activated. Enables topic search when obliqueMap is disabled.
Name Type Description
value boolean includes whether the obliqueMap is active

getLayerForSearch(layerModelsUniqe){Array.<object>}

modules/searchbar/tree/model.js, line 168
Creates new models for the search from the layerModels.
Name Type Default Description
layerModelsUniqe Array.<object> [] optional Unique LightModels of the itemList from Parser.
layerModels[].name string The name of a layer model.
layerModels[].id string The id of a layer model.
Returns:
for search.

getUniqeLayermodels(layerModels){Array.<object>}

modules/searchbar/tree/model.js, line 138
Duplicate layers are removed so that each layer appears only once in the search, even if it is contained in several categories and several times if it exists several times with different records. By name and id of layer model.
Name Type Default Description
layerModels Array.<object> [] optional LightModels of the itemList from Parser.
layerModels[].name string The name of a layer model.
layerModels[].id string The id of a layer model.
Returns:
- Unique LightModels of the itemList from Parser.

getUniqeNodes(nodes){Array.<object>}

modules/searchbar/tree/model.js, line 153
Duplicate nodes are removed so that each node appears only once in the search, by name of node.
Name Type Default Description
nodes Array.<object> [] optional Nodes.
nodes[].name string The name of a node.
Returns:
- Unique LightModels of the itemList from Parser.
modules/searchbar/tree/model.js, line 68
Searches for hits for the search string in layer models.
Name Type Description
searchString string The input in the search bar.
Fires:

searchInLayers(searchStringRegExp){void}

modules/searchbar/tree/model.js, line 111
Executes the search in the layer variable with search string and finds in the layer name and dataset name.
Name Type Description
searchStringRegExp string Suchstring as RegExp.
Fires:

searchInNodes(searchStringRegExp){void}

modules/searchbar/tree/model.js, line 93
Executes the search in the node variable.
Name Type Description
searchStringRegExp string Suchstring as RegExp.
Fires:

setLayers(layers){void}

modules/searchbar/tree/model.js, line 198
Setter for layers.
Name Type Description
layers Array.<object> Layers for search.