From f0d8d4b7892d687f1c22745293aac7726917931d Mon Sep 17 00:00:00 2001 From: Ivo Sonderegger Date: Fri, 19 Mar 2021 11:33:24 +0100 Subject: [PATCH] Release 1.13.0 --- CHANGELOG.md | 10 +- doc/Modelviewer.js.html | 2 +- doc/RepetitiveRequests.js.html | 2 +- doc/Sounding.js.html | 2 +- doc/Synview.js.html | 2 +- doc/ThermodynamicDiagram.js.html | 2 +- doc/ThermodynamicDiagramPluggable.js.html | 2 +- doc/Timeline.js.html | 2 +- doc/Tooltip.js.html | 2 +- doc/base_Collection.js.html | 2 +- doc/base_Named.js.html | 2 +- doc/base_NamedCollection.js.html | 2 +- doc/base_Unique.js.html | 2 +- doc/base_UniqueNamed.js.html | 2 +- doc/calc.js.html | 2 +- doc/events.js.html | 2 +- doc/external-Event.html | 2 +- doc/external-HTMLElement.html | 2 +- doc/external-SVG.html | 2 +- doc/external-XMLHttpRequest.html | 2 +- doc/external-jQuery.html | 2 +- doc/index.html | 118 +++++- doc/index.js.html | 2 +- doc/modelviewer_Container.js.html | 134 +++++-- doc/modelviewer_Display.js.html | 2 +- doc/modelviewer_NWPResources.js.html | 2 +- doc/modelviewer_Node.js.html | 222 ++++++++++-- doc/modelviewer_OffsetVariable.js.html | 2 +- doc/modelviewer_Resource.js.html | 39 +- doc/modelviewer_Resources.js.html | 2 +- doc/modelviewer_ResourcesTreeNode.js.html | 240 ++++++++++++ doc/modelviewer_TimeVariable.js.html | 2 +- doc/modelviewer_Variable.js.html | 2 +- doc/modelviewer_VariableCollection.js.html | 2 +- ...delviewer_display_SelectNavigation.js.html | 2 +- doc/modelviewer_display_Simple.js.html | 2 +- doc/modelviewer_resource_Image.js.html | 2 +- doc/modelviewer_resource_Sounding.js.html | 2 +- doc/module-meteoJS.html | 2 +- ...le-meteoJS_base_collection.Collection.html | 2 +- doc/module-meteoJS_base_collection.html | 2 +- doc/module-meteoJS_base_named.Named.html | 2 +- doc/module-meteoJS_base_named.html | 2 +- ..._base_namedCollection.NamedCollection.html | 2 +- doc/module-meteoJS_base_namedCollection.html | 2 +- doc/module-meteoJS_base_unique.Unique.html | 2 +- doc/module-meteoJS_base_unique.html | 2 +- ...-meteoJS_base_uniquenamed.UniqueNamed.html | 2 +- doc/module-meteoJS_base_uniquenamed.html | 2 +- doc/module-meteoJS_calc.html | 2 +- doc/module-meteoJS_events.html | 2 +- ...odule-meteoJS_modelviewer.Modelviewer.html | 2 +- doc/module-meteoJS_modelviewer.html | 2 +- ...teoJS_modelviewer_container.Container.html | 51 ++- doc/module-meteoJS_modelviewer_container.html | 2 +- ...e-meteoJS_modelviewer_display.Display.html | 2 +- doc/module-meteoJS_modelviewer_display.html | 2 +- ...lay_selectNavigation.SelectNavigation.html | 2 +- ..._modelviewer_display_selectNavigation.html | 2 +- ...oJS_modelviewer_display_simple.Simple.html | 2 +- ...le-meteoJS_modelviewer_display_simple.html | 2 +- doc/module-meteoJS_modelviewer_node.Node.html | 62 +++- doc/module-meteoJS_modelviewer_node.html | 2 +- ...modelviewer_nwpResources.NWPResources.html | 2 +- ...dule-meteoJS_modelviewer_nwpResources.html | 2 +- ...lviewer_offsetVariable.OffsetVariable.html | 2 +- ...le-meteoJS_modelviewer_offsetVariable.html | 2 +- ...meteoJS_modelviewer_resource.Resource.html | 4 +- doc/module-meteoJS_modelviewer_resource.html | 5 +- ...eoJS_modelviewer_resource_image.Image.html | 2 +- ...le-meteoJS_modelviewer_resource_image.html | 2 +- ...odelviewer_resource_sounding.Sounding.html | 2 +- ...meteoJS_modelviewer_resource_sounding.html | 2 +- ...teoJS_modelviewer_resources.Resources.html | 2 +- doc/module-meteoJS_modelviewer_resources.html | 2 +- ...r_resourcesTreeNode.ResourcesTreeNode.html | 342 ++++++++++++++++++ ...meteoJS_modelviewer_resourcesTreeNode.html | 133 +++++++ ...modelviewer_timeVariable.TimeVariable.html | 2 +- ...dule-meteoJS_modelviewer_timeVariable.html | 2 +- ...meteoJS_modelviewer_variable.Variable.html | 2 +- doc/module-meteoJS_modelviewer_variable.html | 2 +- ...variableCollection.VariableCollection.html | 2 +- ...eteoJS_modelviewer_variableCollection.html | 2 +- ...repetitiveRequests.RepetitiveRequests.html | 2 +- doc/module-meteoJS_repetitiveRequests.html | 2 +- doc/module-meteoJS_sounding.Sounding.html | 2 +- doc/module-meteoJS_sounding.html | 2 +- ...module-meteoJS_sounding_parcel.Parcel.html | 2 +- doc/module-meteoJS_sounding_parcel.html | 2 +- doc/module-meteoJS_synview.html | 2 +- ...meteoJS_synview_collection.Collection.html | 2 +- doc/module-meteoJS_synview_collection.html | 2 +- ...module-meteoJS_synview_map.SynviewMap.html | 2 +- doc/module-meteoJS_synview_map.html | 2 +- doc/module-meteoJS_synview_map_ll.MapLL.html | 2 +- doc/module-meteoJS_synview_map_ll.html | 2 +- doc/module-meteoJS_synview_map_ol.MapOL.html | 2 +- doc/module-meteoJS_synview_map_ol.html | 2 +- ...ule-meteoJS_synview_resource.Resource.html | 2 +- doc/module-meteoJS_synview_resource.html | 2 +- ...resourceCollection.ResourceCollection.html | 2 +- ...le-meteoJS_synview_resourceCollection.html | 2 +- ...eoJS_synview_resource_GeoJSON.GeoJSON.html | 2 +- ...dule-meteoJS_synview_resource_GeoJSON.html | 2 +- ...view_resource_GeoJSONTile.GeoJSONTile.html | 2 +- ...-meteoJS_synview_resource_GeoJSONTile.html | 2 +- ...JS_synview_resource_Image.ImageStatic.html | 2 +- ...module-meteoJS_synview_resource_Image.html | 2 +- ...dule-meteoJS_synview_resource_OSM.OSM.html | 2 +- doc/module-meteoJS_synview_resource_OSM.html | 2 +- ...eteoJS_synview_resource_Vector.Vector.html | 2 +- ...odule-meteoJS_synview_resource_Vector.html | 2 +- ...ynview_resource_VectorTile.VectorTile.html | 2 +- ...e-meteoJS_synview_resource_VectorTile.html | 2 +- ...odule-meteoJS_synview_tooltip.Tooltip.html | 2 +- doc/module-meteoJS_synview_tooltip.html | 2 +- doc/module-meteoJS_synview_type.Type.html | 2 +- doc/module-meteoJS_synview_type.html | 2 +- ...synview_typeCollection.TypeCollection.html | 2 +- ...module-meteoJS_synview_typeCollection.html | 2 +- ...modynamicDiagram.ThermodynamicDiagram.html | 2 +- doc/module-meteoJS_thermodynamicDiagram.html | 2 +- ...uggable.ThermodynamicDiagramPluggable.html | 2 +- ...meteoJS_thermodynamicDiagramPluggable.html | 2 +- ...modynamicDiagram_axes_axes_axisLabels.html | 2 +- ...teoJS_thermodynamicDiagram_axes_xAxis.html | 2 +- ...thermodynamicDiagram_axes_xAxis.xAxis.html | 2 +- ...teoJS_thermodynamicDiagram_axes_yAxis.html | 2 +- ...thermodynamicDiagram_axes_yAxis.yAxis.html | 2 +- ...ram_coordinateSystem.CoordinateSystem.html | 2 +- ...thermodynamicDiagram_coordinateSystem.html | 2 +- ...gram_coordinateSystem_emagram.Emagram.html | 2 +- ...namicDiagram_coordinateSystem_emagram.html | 2 +- ...tem_skewTlogPDiagram.SkewTlogPDiagram.html | 2 +- ...ram_coordinateSystem_skewTlogPDiagram.html | 2 +- ...ateSystem_stueveDiagram.StueveDiagram.html | 2 +- ...iagram_coordinateSystem_stueveDiagram.html | 2 +- ...icDiagram_diagramParcel.DiagramParcel.html | 2 +- ...JS_thermodynamicDiagram_diagramParcel.html | 2 +- ...agram_diagramSounding.DiagramSounding.html | 2 +- ..._thermodynamicDiagram_diagramSounding.html | 2 +- ...eteoJS_thermodynamicDiagram_functions.html | 2 +- ...rmodynamicDiagram_hodograph.Hodograph.html | 2 +- ...eteoJS_thermodynamicDiagram_hodograph.html | 2 +- ...AltitudeDataArea.PlotAltitudeDataArea.html | 2 +- ...modynamicDiagram_plotAltitudeDataArea.html | 2 +- ...hermodynamicDiagram_plotArea.PlotArea.html | 2 +- ...meteoJS_thermodynamicDiagram_plotArea.html | 2 +- ...amicDiagram_plotDataArea.PlotDataArea.html | 2 +- ...oJS_thermodynamicDiagram_plotDataArea.html | 2 +- ...rmodynamicDiagram_tdDiagram.TDDiagram.html | 2 +- ...eteoJS_thermodynamicDiagram_tdDiagram.html | 2 +- ...ram_windbarbsProfile.WindbarbsProfile.html | 2 +- ...thermodynamicDiagram_windbarbsProfile.html | 2 +- ...ram_windspeedProfile.WindspeedProfile.html | 2 +- ...thermodynamicDiagram_windspeedProfile.html | 2 +- doc/module-meteoJS_timeline.Timeline.html | 2 +- doc/module-meteoJS_timeline.html | 2 +- ...-meteoJS_timeline_animation.Animation.html | 2 +- doc/module-meteoJS_timeline_animation.html | 2 +- ...e_animation_togglebutton.ToggleButton.html | 2 +- ...teoJS_timeline_animation_togglebutton.html | 2 +- ...e_navigationButtons.NavigationButtons.html | 2 +- ...le-meteoJS_timeline_navigationButtons.html | 2 +- ..._timeline_visualisation.Visualisation.html | 2 +- ...module-meteoJS_timeline_visualisation.html | 2 +- ...ine_visualisation_bsButtons.bsButtons.html | 2 +- ...eoJS_timeline_visualisation_bsButtons.html | 2 +- ...e_visualisation_bsDropdown.bsDropdown.html | 2 +- ...oJS_timeline_visualisation_bsDropdown.html | 2 +- ..._timeline_visualisation_slider.Slider.html | 2 +- ...meteoJS_timeline_visualisation_slider.html | 2 +- ...eoJS_timeline_visualisation_text.Text.html | 2 +- ...e-meteoJS_timeline_visualisation_text.html | 2 +- doc/module-meteoJS_tooltip.Tooltip.html | 2 +- doc/module-meteoJS_tooltip.html | 2 +- ...tip_bootstrapTooltip.BootstrapTooltip.html | 2 +- ...dule-meteoJS_tooltip_bootstrapTooltip.html | 2 +- doc/scripts/jsdoc-toc.js | 2 +- doc/sounding_Parcel.js.html | 2 +- doc/synview_Collection.js.html | 2 +- doc/synview_Resource.js.html | 2 +- doc/synview_ResourceCollection.js.html | 2 +- doc/synview_SynviewMap.js.html | 2 +- doc/synview_Tooltip.js.html | 2 +- doc/synview_Type.js.html | 2 +- doc/synview_TypeCollection.js.html | 2 +- doc/synview_map_MapLL.js.html | 2 +- doc/synview_map_MapOL.js.html | 2 +- doc/synview_resource_GeoJSON.js.html | 2 +- doc/synview_resource_GeoJSONTile.js.html | 2 +- doc/synview_resource_Image.js.html | 2 +- doc/synview_resource_OSM.js.html | 2 +- doc/synview_resource_Vector.js.html | 2 +- doc/synview_resource_VectorTile.js.html | 2 +- ...rmodynamicDiagram_CoordinateSystem.js.html | 2 +- ...thermodynamicDiagram_DiagramParcel.js.html | 2 +- ...ermodynamicDiagram_DiagramSounding.js.html | 2 +- doc/thermodynamicDiagram_Functions.js.html | 2 +- doc/thermodynamicDiagram_Hodograph.js.html | 2 +- ...ynamicDiagram_PlotAltitudeDataArea.js.html | 2 +- doc/thermodynamicDiagram_TDDiagram.js.html | 2 +- ...rmodynamicDiagram_WindbarbsProfile.js.html | 2 +- ...rmodynamicDiagram_WindspeedProfile.js.html | 2 +- ...ermodynamicDiagram_axes_axisLabels.js.html | 2 +- doc/thermodynamicDiagram_axes_xAxis.js.html | 2 +- doc/thermodynamicDiagram_axes_yAxis.js.html | 2 +- ...icDiagram_coordinateSystem_Emagram.js.html | 2 +- ..._coordinateSystem_SkewTlogPDiagram.js.html | 2 +- ...ram_coordinateSystem_StueveDiagram.js.html | 2 +- doc/thermodynamicDiagram_plotArea.js.html | 2 +- doc/thermodynamicDiagram_plotDataArea.js.html | 2 +- doc/timeline_Animation.js.html | 2 +- doc/timeline_NavigationButtons.js.html | 2 +- doc/timeline_Visualisation.js.html | 2 +- doc/timeline_animation_ToggleButton.js.html | 2 +- doc/timeline_visualisation_Slider.js.html | 2 +- doc/timeline_visualisation_Text.js.html | 2 +- doc/timeline_visualisation_bsButtons.js.html | 2 +- doc/timeline_visualisation_bsDropdown.js.html | 2 +- doc/tooltip_BootstrapTooltip.js.html | 2 +- package.json | 2 +- 222 files changed, 1448 insertions(+), 332 deletions(-) create mode 100644 doc/modelviewer_ResourcesTreeNode.js.html create mode 100644 doc/module-meteoJS_modelviewer_resourcesTreeNode.ResourcesTreeNode.html create mode 100644 doc/module-meteoJS_modelviewer_resourcesTreeNode.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 34daf0e3..30910101 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,13 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] + +## [1.13.0] - 2021-03-19 ### Added - Internal class [ResourcesTreeNode](https://chird.github.io/meteoJS/doc/module-meteoJS_modelviewer_resourcesTreeNode.ResourcesTreeNode.html). - Method `getSelectedVariable` in [Container](https://chird.github.io/meteoJS/doc/module-meteoJS_modelviewer_container.Container.html). + ### Changed - Internal data structure in [Node](https://chird.github.io/meteoJS/doc/module-meteoJS_modelviewer_node.Node.html). +- Internal data structure in [Resource](https://chird.github.io/meteoJS/doc/module-meteoJS_modelviewer_resource.Resource.html). +- Updated several packages. ## [1.12.0] - 2021-03-01 ### Added @@ -157,8 +162,9 @@ will not work anymore, until you pass a callback to `getTimeText`. ### Fixed - Some tests with DOM usage. -[Unreleased]: https://github.com/chird/meteoJS/compare/v1.12.0...HEAD -[Unreleased]: https://github.com/chird/meteoJS/compare/v1.11.4...v1.12.0 +[Unreleased]: https://github.com/chird/meteoJS/compare/v1.13.0...HEAD +[1.13.0]: https://github.com/chird/meteoJS/compare/v1.12.0...v1.13.0 +[1.12.0]: https://github.com/chird/meteoJS/compare/v1.11.4...v1.12.0 [1.11.4]: https://github.com/chird/meteoJS/compare/v1.11.3...v1.11.4 [1.11.3]: https://github.com/chird/meteoJS/compare/v1.11.2...v1.11.3 [1.11.2]: https://github.com/chird/meteoJS/compare/v1.11.1...v1.11.2 diff --git a/doc/Modelviewer.js.html b/doc/Modelviewer.js.html index 5b11a7ec..99a39b1f 100644 --- a/doc/Modelviewer.js.html +++ b/doc/Modelviewer.js.html @@ -277,7 +277,7 @@

Source: Modelviewer.js

diff --git a/doc/RepetitiveRequests.js.html b/doc/RepetitiveRequests.js.html index 863d689c..c8bfe9ad 100644 --- a/doc/RepetitiveRequests.js.html +++ b/doc/RepetitiveRequests.js.html @@ -383,7 +383,7 @@

Source: RepetitiveRequests.js

diff --git a/doc/Sounding.js.html b/doc/Sounding.js.html index 12d5dade..67054a66 100644 --- a/doc/Sounding.js.html +++ b/doc/Sounding.js.html @@ -277,7 +277,7 @@

Source: Sounding.js

diff --git a/doc/Synview.js.html b/doc/Synview.js.html index a2d9e4a2..c118c68b 100644 --- a/doc/Synview.js.html +++ b/doc/Synview.js.html @@ -201,7 +201,7 @@

Source: Synview.js

diff --git a/doc/ThermodynamicDiagram.js.html b/doc/ThermodynamicDiagram.js.html index f2bc22af..0b352cff 100644 --- a/doc/ThermodynamicDiagram.js.html +++ b/doc/ThermodynamicDiagram.js.html @@ -300,7 +300,7 @@

Source: ThermodynamicDiagram.js

diff --git a/doc/ThermodynamicDiagramPluggable.js.html b/doc/ThermodynamicDiagramPluggable.js.html index 44fb33ba..edd0c52e 100644 --- a/doc/ThermodynamicDiagramPluggable.js.html +++ b/doc/ThermodynamicDiagramPluggable.js.html @@ -231,7 +231,7 @@

Source: ThermodynamicDiagramPluggable.js

diff --git a/doc/Timeline.js.html b/doc/Timeline.js.html index 8be7b772..db18340a 100644 --- a/doc/Timeline.js.html +++ b/doc/Timeline.js.html @@ -894,7 +894,7 @@

Source: Timeline.js

diff --git a/doc/Tooltip.js.html b/doc/Tooltip.js.html index db60d4ec..919630e9 100644 --- a/doc/Tooltip.js.html +++ b/doc/Tooltip.js.html @@ -155,7 +155,7 @@

Source: Tooltip.js

diff --git a/doc/base_Collection.js.html b/doc/base_Collection.js.html index 76b70fc1..3f5ecef4 100644 --- a/doc/base_Collection.js.html +++ b/doc/base_Collection.js.html @@ -318,7 +318,7 @@

Source: base/Collection.js

diff --git a/doc/base_Named.js.html b/doc/base_Named.js.html index de312cc4..8d061a85 100644 --- a/doc/base_Named.js.html +++ b/doc/base_Named.js.html @@ -162,7 +162,7 @@

Source: base/Named.js

diff --git a/doc/base_NamedCollection.js.html b/doc/base_NamedCollection.js.html index 57bd56e8..c6bbb70d 100644 --- a/doc/base_NamedCollection.js.html +++ b/doc/base_NamedCollection.js.html @@ -110,7 +110,7 @@

Source: base/NamedCollection.js

diff --git a/doc/base_Unique.js.html b/doc/base_Unique.js.html index d7f0d801..ec42e7dc 100644 --- a/doc/base_Unique.js.html +++ b/doc/base_Unique.js.html @@ -83,7 +83,7 @@

Source: base/Unique.js

diff --git a/doc/base_UniqueNamed.js.html b/doc/base_UniqueNamed.js.html index 4db7cb7d..ff90da05 100644 --- a/doc/base_UniqueNamed.js.html +++ b/doc/base_UniqueNamed.js.html @@ -95,7 +95,7 @@

Source: base/UniqueNamed.js

diff --git a/doc/calc.js.html b/doc/calc.js.html index 96421728..24816a92 100644 --- a/doc/calc.js.html +++ b/doc/calc.js.html @@ -523,7 +523,7 @@

Source: calc.js

diff --git a/doc/events.js.html b/doc/events.js.html index b1462a45..c834cc75 100644 --- a/doc/events.js.html +++ b/doc/events.js.html @@ -165,7 +165,7 @@

Source: Events.js

diff --git a/doc/external-Event.html b/doc/external-Event.html index e69049e9..603a401d 100644 --- a/doc/external-Event.html +++ b/doc/external-Event.html @@ -51,7 +51,7 @@

Event

diff --git a/doc/external-HTMLElement.html b/doc/external-HTMLElement.html index 201e474d..7ff897bd 100644 --- a/doc/external-HTMLElement.html +++ b/doc/external-HTMLElement.html @@ -51,7 +51,7 @@

HTMLElement

diff --git a/doc/external-SVG.html b/doc/external-SVG.html index 3e7629fe..576a5f34 100644 --- a/doc/external-SVG.html +++ b/doc/external-SVG.html @@ -51,7 +51,7 @@

SVG

diff --git a/doc/external-XMLHttpRequest.html b/doc/external-XMLHttpRequest.html index fbbd46d3..29ad5df4 100644 --- a/doc/external-XMLHttpRequest.html +++ b/doc/external-XMLHttpRequest.html @@ -51,7 +51,7 @@

XMLHttpRequest

diff --git a/doc/external-jQuery.html b/doc/external-jQuery.html index 3042b925..2763804b 100644 --- a/doc/external-jQuery.html +++ b/doc/external-jQuery.html @@ -51,7 +51,7 @@

jQuery

diff --git a/doc/index.html b/doc/index.html index 741073aa..b2b6a6fb 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1153,17 +1153,17 @@

meteoJS/modelviewer/container.C
- meteoJS/modelviewer/container.Container#id + meteoJS/modelviewer/container.Container#getSelectedVariable(variableCollection)
- meteoJS/modelviewer/container.Container#mirrorsFrom([container][, variableCollections]) + meteoJS/modelviewer/container.Container#id
- meteoJS/modelviewer/container.Container#modelviewer + meteoJS/modelviewer/container.Container#mirrorsFrom([container][, variableCollections])
@@ -1172,6 +1172,11 @@

meteoJS/modelviewer/container.C +
+
+

meteoJS/modelviewer/resourcesTreeNode

+
+ + + + +
+
+
+
+ +
+
+
+
+ +

meteoJS/modelviewer/timeVariable

@@ -2784,7 +2888,7 @@

meteoJS/synview

- meteoJS/synview(options) + meteoJS/synview
@@ -9212,7 +9316,7 @@

meteoJS/tooltip/boots
diff --git a/doc/index.js.html b/doc/index.js.html index c5a2696a..dd028af2 100644 --- a/doc/index.js.html +++ b/doc/index.js.html @@ -245,7 +245,7 @@

Source: index.js

diff --git a/doc/modelviewer_Container.js.html b/doc/modelviewer_Container.js.html index 3188949b..10ce1af2 100644 --- a/doc/modelviewer_Container.js.html +++ b/doc/modelviewer_Container.js.html @@ -37,6 +37,7 @@

Source: modelviewer/Container.js

import Resource from './Resource.js'; import Node from './Node.js'; import Display from './Display.js'; +import Variable from './Variable.js'; import VariableCollection from './VariableCollection.js'; /** @@ -197,10 +198,10 @@

Source: modelviewer/Container.js

this._displayVariables = new Set(); /** - * @type Set<module:meteoJS/modelviewer/variable.Variable> + * @type Map.<module:meteoJS/modelviewer/variableCollection.VariableCollection,module:meteoJS/modelviewer/variable.Variable> * @private */ - this._selectedVariables = new Set(); + this._selectedVariables = new Map(); /** * @type module:meteoJS/modelviewer/node.Node|undefined @@ -375,7 +376,10 @@

Source: modelviewer/Container.js

removedVariables.size > 0 ) { this._displayVariables = variables; - this._updateSelectedVariables(); + this._updateSelectedVariables({ + addedVariables, + removedVariables + }); this.trigger( 'change:displayVariables', { addedVariables, removedVariables } @@ -395,7 +399,21 @@

Source: modelviewer/Container.js

* @readonly */ get selectedVariables() { - return this._selectedVariables; + return new Set([...this._selectedVariables.values()]); + } + + /** + * Returns the selected Variable of a VariableCollection. If no selected + * variable exists, an empty Variable-Object will be returned. + * + * @param {module:meteoJS/modelviewer/variableCollection.VariableCollection} + * variableCollection - VariableCollection. + * @returns {module:meteoJS/modelviewer/variable.Variable} + * The selected Variable of the colleciton. + */ + getSelectedVariable(variableCollection) { + const result = this._selectedVariables.get(variableCollection); + return (result === undefined) ? new Variable({ id: undefined }) : result; } /** @@ -558,18 +576,53 @@

Source: modelviewer/Container.js

* * @private */ - _updateSelectedVariables() { + _updateSelectedVariables({ + addedVariables = undefined, + removedVariables = undefined + } = {}) { + let nodes = []; + const sV = new Set(); + let lSV = undefined; + if (addedVariables === undefined || removedVariables === undefined) + nodes.push(this.modelviewer.resources.topNode); + else { + const findFirstNodeWithVariable = node => { + let isFound = false; + for (const variable of [...addedVariables, ...removedVariables]) { + if (variable.variableCollection.node === node) { + nodes.push(node); + isFound = true; + break; + } + } + if (!isFound) { + const tempSV = this.getSelectedVariable(node.variableCollection); + if (tempSV.id !== undefined) { + lSV = tempSV; + sV.add(lSV); + for (const childNode of node.children) + findFirstNodeWithVariable(childNode); + } + } + }; + findFirstNodeWithVariable(this.modelviewer.resources.topNode); + nodes = nodes.filter((n,i,a) => i===a.indexOf(n)); + if (nodes.length < 1) + nodes.push(this.modelviewer.resources.topNode); + } let [selectedVariables, lastSelectedVariable] = this._getSelectedVariablesWithResources( - [this.modelviewer.resources.topNode], - new Set(), - undefined + nodes, + sV, + lSV ); let node; if (selectedVariables === undefined) { - selectedVariables = new Set(); - node = new Node({ variableCollection: new VariableCollection() }); + selectedVariables = sV; + node = (lSV !== undefined) + ? lSV.variableCollection.node + : new Node({ variableCollection: new VariableCollection() }); } else node = lastSelectedVariable.variableCollection.node; @@ -603,32 +656,8 @@

Source: modelviewer/Container.js

if (isResourceSelected.call(this, selectedVariables, lastSelectedVariable)) return [selectedVariables, lastSelectedVariable]; - let possibleSelectedVariables = []; - let availableSelectedVariables = []; - for (let childNode of nodes) { - if (this.modelviewer.resources.availableVariablesMap.has(childNode) && - this.modelviewer.resources.availableVariablesMap.get(childNode).size) - for (let availableVariable - of this.modelviewer.resources.availableVariablesMap.get(childNode)) { - if (this.displayVariables.has(availableVariable)) - possibleSelectedVariables.push(availableVariable); - else if (this._adaptSuitableResource.enabled) - availableSelectedVariables.push(availableVariable); - } - } - - [].push.call( - possibleSelectedVariables, - ...this._adaptSuitableResource - .getPossibleVariables - .call(this, availableSelectedVariables, selectedVariables) - ); - let result = [undefined, undefined]; - possibleSelectedVariables.forEach(possibleSelectedVariable => { - if (result[0] !== undefined) - return; - + const checkPossibleVariable = possibleSelectedVariable => { let tempSelectedVariables = new Set(selectedVariables); tempSelectedVariables.add(possibleSelectedVariable); let [resultSelectedVariables, resultLastSelectedVariable] = @@ -660,7 +689,34 @@

Source: modelviewer/Container.js

result[0] = tempSelectedVariables; result[1] = possibleSelectedVariable; } - }); + }; + + let availableSelectedVariables = []; + for (let childNode of nodes) { + if (this.modelviewer.resources.availableVariablesMap.has(childNode) && + this.modelviewer.resources.availableVariablesMap.get(childNode).size) + for (const variable of childNode.variableCollection) { + if (!this.modelviewer.resources + .availableVariablesMap.get(childNode).has(variable)) + continue; + if (this.displayVariables.has(variable)) + checkPossibleVariable(variable); + else if (this._adaptSuitableResource.enabled) + availableSelectedVariables.push(variable); + if (result[0] !== undefined) + break; + } + if (result[0] !== undefined) + break; + } + if (result[0] !== undefined) + return result; + + for (const variable of availableSelectedVariables) { + checkPossibleVariable(variable); + if (result[0] !== undefined) + break; + } return result; } @@ -686,7 +742,9 @@

Source: modelviewer/Container.js

addedVariables.size > 0 || removedVariables.size > 0 ) { - this._selectedVariables = selectedVariables; + this._selectedVariables.clear(); + for (const variable of selectedVariables) + this._selectedVariables.set(variable.variableCollection, variable); this._selectedNode = selectedNode; this._setTimes(); this._setEnabledResources(); @@ -777,7 +835,7 @@

Source: modelviewer/Container.js

diff --git a/doc/modelviewer_Display.js.html b/doc/modelviewer_Display.js.html index edb847ba..a8e6af45 100644 --- a/doc/modelviewer_Display.js.html +++ b/doc/modelviewer_Display.js.html @@ -377,7 +377,7 @@

Source: modelviewer/Display.js

diff --git a/doc/modelviewer_NWPResources.js.html b/doc/modelviewer_NWPResources.js.html index efd4c8a4..eec58b0d 100644 --- a/doc/modelviewer_NWPResources.js.html +++ b/doc/modelviewer_NWPResources.js.html @@ -182,7 +182,7 @@

Source: modelviewer/NWPResources.js

diff --git a/doc/modelviewer_Node.js.html b/doc/modelviewer_Node.js.html index 0f5fc882..93efebd0 100644 --- a/doc/modelviewer_Node.js.html +++ b/doc/modelviewer_Node.js.html @@ -33,6 +33,7 @@

Source: modelviewer/Node.js

* @module meteoJS/modelviewer/node */ import addEventFunctions from '../Events.js'; +import ResourcesTreeNode from './ResourcesTreeNode.js'; /** * Triggered on append of a child node. @@ -82,17 +83,18 @@

Source: modelviewer/Node.js

this._children = []; /** - * @type Map<module:meteoJS/modelviewer/variableCollection.VariableCollection, - * Set<module:meteoJS/modelviewer/resource.Resource>> + * @type undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode * @private */ - this._resources = new Map(); - + this._resourcesTopNode = undefined; + /** - * @type Set<undefined|module:meteoJS/modelviewer/resource.Resource[]> + * @type Map<module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode, + * Map<module:meteoJS/modelviewer/variable.Variable, + * Set<module:meteoJS/modelviewer/resource.Resource>>> * @private */ - this._resourcesCache = undefined; + this._resources = new Map(); } /** @@ -155,16 +157,12 @@

Source: modelviewer/Node.js

* @package */ get resources() { - if (this._resourcesCache !== undefined) - return this._resourcesCache; - - let result = new Set(); - for (let resources of this._resources.values()) { - for (let r of resources.values()) - result.add(r); + const result = []; + for (const m of this._resources.values()) { + [...m.values()] + .forEach(resources => result.push(...resources)); } - this._resourcesCache = [...result]; - return this._resourcesCache; + return result; } /** @@ -176,25 +174,41 @@

Source: modelviewer/Node.js

* @package */ append(...resources) { + if (this._resourcesTopNode === undefined) + this._makeResourcesTopNode(); + let addedCount = 0; resources.forEach(resource => { - let variable = - resource.getVariableByVariableCollection(this.variableCollection); - /* Only append resources, that have variables which belongs to node's - * collection. - */ - if (variable.id === undefined) + if (resource.variables + .filter(v => v.variableCollection === this.variableCollection) + .length < 1) return; - resource.variables.forEach(variable => { - if (!this._resources.has(variable.variableCollection)) - this._resources.set(variable.variableCollection, new Set()); - if (!this._resources.get(variable.variableCollection).has(resource)) - addedCount++; - this._resources.get(variable.variableCollection).add(resource); - }); + const resourcesTreeNode = + this._resourcesTopNode.buildChildrenTreeForResource({ + resource, + aimedNode: this + }); + if (resourcesTreeNode !== undefined) { + const variable = resource + .getVariableByVariableCollection(resourcesTreeNode.variableCollection); + if (variable !== undefined) { + let mapByVariables = this._resources.get(resourcesTreeNode); + if (mapByVariables === undefined) { + mapByVariables = new Map(); + this._resources.set(resourcesTreeNode, mapByVariables); + } + let resources = mapByVariables.get(variable); + if (resources === undefined) { + resources = new Set(); + mapByVariables.set(variable, resources); + } + if (!resources.has(resource)) { + resources.add(resource); + addedCount++; + } + } + } }); - if (addedCount) - this._resourcesCache = undefined; return addedCount; } @@ -209,14 +223,30 @@

Source: modelviewer/Node.js

remove(...resources) { let removedCount = 0; resources.forEach(resource => { - resource.variables.forEach(variable => { - if (this._resources.has(variable.variableCollection)) - if (this._resources.get(variable.variableCollection).delete(resource)) + const resourcesTreeNode = this._resourcesTopNode + .findNodeByVariables(...resource.variables); + if (resourcesTreeNode !== undefined) { + const variable = resource + .getVariableByVariableCollection(resourcesTreeNode.variableCollection); + const mapByVariables = this._resources.get(resourcesTreeNode); + if (mapByVariables !== undefined) { + const resourcesSet = mapByVariables.get(variable); + if (resourcesSet !== undefined) { + resourcesSet.delete(resource); removedCount++; - }); + if (resourcesSet.size < 1) { + mapByVariables.delete(variable); + if (mapByVariables.size < 1) { + this._resources.delete(resourcesTreeNode); + const parent = resourcesTreeNode.parent; + if (parent !== undefined) + parent.removeChild({ child: resourcesTreeNode }); + } + } + } + } + } }); - if (removedCount) - this._resourcesCache = undefined; return removedCount; } @@ -231,6 +261,9 @@

Source: modelviewer/Node.js

* @returns {module:meteoJS/modelviewer/resource.Resource[]} Resources. */ getResourcesByVariables(...variables) { + if (this._resourcesTopNode === undefined) + return []; + let exactlyMatch = false; if (variables.length && typeof variables[0] === 'boolean') @@ -238,10 +271,119 @@

Source: modelviewer/Node.js

if (exactlyMatch && variables.length == 0) return []; - - return this.resources.filter(resource => { - return resource.isDefinedBy(exactlyMatch, ...variables); + + if (exactlyMatch) { + const variablesSet = new Set(variables); + const node = this._resourcesTopNode.findNodeByVariables(...variables); + const mapByVariables = this._resources.get(node); + if (mapByVariables !== undefined) { + for (const [variable, resources] of mapByVariables) { + if (!variablesSet.has(variable)) + continue; + if (resources === undefined || resources.size < 1) + return []; + const resource = [...resources][0]; + let isAdded = true; + variables.forEach(variable => { + const v = resource.getVariableByVariableCollection(variable.variableCollection); + if (v !== variable) + isAdded = false; + }); + return isAdded ? [...resources] : []; + } + } + return []; + } + + // !exactlyMatch + const collectResourcesTreeChildren = resourcesTreeNode => { + let result = new Set(); + if (resourcesTreeNode.children.length < 1) { + result.add(resourcesTreeNode); + return result; + } + let v = undefined; + variables.forEach(variable => { + if (variable.variableCollection === resourcesTreeNode.variableCollection) + v = variable; + }); + /* If no variable is found, then collect the nodes of all children. */ + if (v === undefined) { + resourcesTreeNode.children.forEach(child => { + result = new Set([...result, ...collectResourcesTreeChildren(child)]); + }); + } + else { + const child = resourcesTreeNode.getChildByVariable(v); + if (child !== undefined) + result = new Set([...result, ...collectResourcesTreeChildren(child)]); + } + return result; + }; + const resourcesTreeNodes = collectResourcesTreeChildren(this._resourcesTopNode); + const result = []; + [...resourcesTreeNodes].forEach(resourcesTreeNode => { + const mapByVariables = this._resources.get(resourcesTreeNode); + if (mapByVariables === undefined) + return; + for (const [variable, resources] of mapByVariables) { + if (variable.variableCollection !== resourcesTreeNode.variableCollection) + continue; + if (resources === undefined || resources.size < 1) + return; + const resource = [...resources][0]; + let isAdded = true; + variables.forEach(variable => { + const v = resource.getVariableByVariableCollection(variable.variableCollection); + if (v !== variable) { + isAdded = false; + } + }); + if (isAdded) + result.push(...resources); + } }); + return result; + } + + /** + * Returns if there exists resources which are defined by all of the passed + * variables. + * + * @param {boolean} [exactlyMatch=false] - Only returns true, if there exists + * at least one resource, which is defined exactly by the passed variables. + * @param {...module:meteoJS/modelviewer/variable.Variable} variables + * Variables. + * @returns {boolean} Exists at least one resource. + */ + hasResourcesByVariables(...variables) { + return (this.getResourcesByVariables(...variables).length > 0); + } + + /** + * Creates to top node for the resources-tree. + * + * @private + */ + _makeResourcesTopNode() { + const traversedNodes = new Set(); + const getTopNode = node => { + const parents = node.parents; + if (parents.length < 1) + return node; + let result = undefined; + parents.forEach(parentNode => { + if (!traversedNodes.has(parentNode)) { + traversedNodes.add(parentNode); + const r = getTopNode(parentNode); + if (r !== undefined) + result = r; + } + }); + return result; + }; + this._resourcesTopNode = + new ResourcesTreeNode({ node: getTopNode(this) }); } } addEventFunctions(Node.prototype); @@ -255,7 +397,7 @@

Source: modelviewer/Node.js

diff --git a/doc/modelviewer_OffsetVariable.js.html b/doc/modelviewer_OffsetVariable.js.html index be923876..2dc78f03 100644 --- a/doc/modelviewer_OffsetVariable.js.html +++ b/doc/modelviewer_OffsetVariable.js.html @@ -125,7 +125,7 @@

Source: modelviewer/OffsetVariable.js

diff --git a/doc/modelviewer_Resource.js.html b/doc/modelviewer_Resource.js.html index 3e321f20..4c2363f5 100644 --- a/doc/modelviewer_Resource.js.html +++ b/doc/modelviewer_Resource.js.html @@ -40,6 +40,7 @@

Source: modelviewer/Resource.js

* @typedef {Object} module:meteoJS/modelviewer/resource~options * @param {module:meteoJS/modelviewer/variable.Variable[]} [variables] - * Variables, which define this resource uniquely. + * The variables must be from different VariableCollections. * @param {Date} [datetime] - Datetime, ignored if run and offset are defined. * @param {Date} [run] - Runtime. * @param {integer} [offset] - Offset in seconds. @@ -65,8 +66,9 @@

Source: modelviewer/Resource.js

* @type Set<module:meteoJS/modelviewer/variable.Variable> * @private */ - this._variables = new Set; - variables.forEach(variable => this._variables.add(variable)); + this._variables = new Map(); + variables.forEach(variable => + this._variables.set(variable.variableCollection, variable)); /** * @type Date|undefined @@ -94,7 +96,7 @@

Source: modelviewer/Resource.js

* @readonly */ get variables() { - return [...this._variables]; + return [...this._variables.values()]; } /** @@ -147,11 +149,7 @@

Source: modelviewer/Resource.js

* @returns {module:meteoJS/modelviewer/variable.Variable} */ getVariableByVariableCollection(variableCollection) { - let result = undefined; - this.variables.forEach(variable => { - if (variable.variableCollection === variableCollection) - result = variable; - }); + const result = this._variables.get(variableCollection); return (result === undefined) ? new Variable() : result; } @@ -169,18 +167,14 @@

Source: modelviewer/Resource.js

if (variables.length && typeof variables[0] === 'boolean') exactlyMatch = variables.shift(); + const vars = new Set([...this._variables.values()]); if (!exactlyMatch) - return variables.filter(v => !this._variables.has(v)).length == 0; + return variables.filter(v => !vars.has(v)).length == 0; - let result = true; - let variablesSet = new Set(variables); - for (let variable of variablesSet) - if (!this._variables.has(variable)) - result = false; - for (let variable of this._variables) - if (!variablesSet.has(variable)) - result = false; - return result; + if (variables.filter(v => !vars.has(v)).length != 0) + return false; + const variablesSet = new Set(variables); + return [...vars].filter(v => !variablesSet.has(v)).length == 0; } /** @@ -192,12 +186,7 @@

Source: modelviewer/Resource.js

* @returns {boolean} A variable of the collection defines the resource. */ isDefinedByVariableOf(variableCollection) { - let result = false; - variableCollection.variables.forEach(variable => { - if (this.isDefinedBy(variable)) - result = true; - }); - return result; + return this._variables.get(variableCollection) !== undefined; } /** @@ -221,7 +210,7 @@

Source: modelviewer/Resource.js

diff --git a/doc/modelviewer_Resources.js.html b/doc/modelviewer_Resources.js.html index 08418ff8..84c339c4 100644 --- a/doc/modelviewer_Resources.js.html +++ b/doc/modelviewer_Resources.js.html @@ -524,7 +524,7 @@

Source: modelviewer/Resources.js

diff --git a/doc/modelviewer_ResourcesTreeNode.js.html b/doc/modelviewer_ResourcesTreeNode.js.html new file mode 100644 index 00000000..c415f102 --- /dev/null +++ b/doc/modelviewer_ResourcesTreeNode.js.html @@ -0,0 +1,240 @@ + + + + + + + Source: modelviewer/ResourcesTreeNode.js + + + + + + + + +
+
+
+ +
+ +
+
/**
+ * @module meteoJS/modelviewer/resourcesTreeNode
+ */
+
+/**
+ * Options for constructor.
+ * 
+ * @typedef {Object} module:meteoJS/modelviewer/resourcesTreeNode~options
+ * @param {module:meteoJS/modelviewer/node.Node} node
+ *   The object is linked to this node.
+ */
+
+/**
+ * Internal class to manage the available resources inside the
+ * {@link module:meteoJS/modelviewer/node.Node|Node class}. Each
+ * ResourcesTreeNode object is linked to a Node object. It is a many to one
+ * relation. The hierarchy of the ResourcesTree is analogue to the Node
+ * hierarchy. But the tree is build via the
+ * {@link module:meteoJS/modelviewer/variable.Variable|Variable objects}.
+ * So, this class is not only linked to a Node object, but subsequently for a
+ * {@link module:meteoJS/modelviewer/variableCollection.VariableCollection|VariableCollection object}.
+ * If a {@link module:meteoJS/modelviewer/resource.Resource|Resource} for a
+ * certain Variable object from this VariableCollection is added, then a
+ * child ResourcesTreeNode object is inserted in the tree (if it doesn't exists)
+ * for the Variable object.
+ * 
+ * @internal
+ */
+export class ResourcesTreeNode {
+  
+  /**
+   * @param {module:meteoJS/modelviewer/resourcesNode~options} [options]
+   *   Options.
+   */
+  constructor({ node }) {
+    
+    /**
+     * @type module:meteoJS/modelviewer/node.Node
+     * @private
+     */
+    this._node = node;
+
+    /**
+     * @type Map.<module:meteoJS/modelviewer/variable.Variable,module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode>
+     * @private
+     */
+    this._children = new Map();
+
+    /**
+     * @type module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode
+     * @private
+     */
+    this._parent = undefined;
+  }
+
+  /**
+   * Linked Node object.
+   * 
+   * @type module:meteoJS/modelviewer/node.Node
+   * @readonly
+   */
+  get node() {
+    return this._node;
+  }
+
+  /**
+   * Linked VariableCollection object.
+   * 
+   * @type module:meteoJS/modelviewer/variableCollection.VariableCollection
+   * @readonly
+   */
+  get variableCollection() {
+    return this._node.variableCollection;
+  }
+
+  get children() {
+    return [...this._children.values()];
+  }
+
+  /**
+   * The parent object of this ResourcesTree-Node.
+   * 
+   * @type undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode
+   */
+  get parent() {
+    return this._parent;
+  }
+  set parent(parent) {
+    this._parent = parent;
+  }
+
+  /**
+   * Returns the child corresponding to the passed variable.
+   * 
+   * @param {module:meteoJS/modelviewer/variable.Variable} variable - Variable.
+   * @returns {module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}
+   *   Child ResourcesTreeNode object for the passed variable.
+   */
+  getChildByVariable(variable) {
+    return this._children.get(variable);
+  }
+
+  /**
+   * Build tree 
+   * 
+   * @param {Object} options - Options.
+   * @param {module:meteoJS/modelviewer/resource.Resource} options.resource
+   *   The added Resource object.
+   * @param {module:meteoJS/modelviewer/node.Node} options.aimedNode
+   *   The Resource object will be inserted into this Node object.
+   * @returns {undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}
+   */
+  buildChildrenTreeForResource({
+    resource,
+    aimedNode
+  }) {
+    if (this.node === aimedNode)
+      return this;
+
+    const variable =
+      resource.getVariableByVariableCollection(this.variableCollection);
+    /* Shouldn't get an unknown Variable. The resource is inserted in the
+     * Node-tree with a Variable in each Node. */
+    if (variable.id === undefined)
+      return undefined;
+
+    let child = this._children.get(variable);
+    if (child !== undefined)
+      return child.buildChildrenTreeForResource({ resource, aimedNode });
+    // Child doesn't already exist
+    this.node.children.forEach(node => {
+      // The resource will belong only to one node.
+      const childVariable =
+        resource.getVariableByVariableCollection(node.variableCollection);
+      if (childVariable.id !== undefined)
+        child = new ResourcesTreeNode({ node });
+    });
+    if (child !== undefined) {
+      this._children.set(variable, child);
+      child.parent = this;
+      return child.buildChildrenTreeForResource({ resource, aimedNode });
+    }
+    return undefined;
+  }
+
+  /**
+   * Removes a child in the Resources-Tree. If this was the only child of this
+   * Resources-Tree-Node, then remove this Tree-Node from the parent.
+   */
+  removeChild({
+    child
+  }) {
+    for (const [variable, c] of this._children.entries())
+      if (c === child)
+        this._children.delete(variable);
+    if (this._children.size < 1
+      && this.parent !== undefined)
+      this.parent.removeChild({ child: this });
+  }
+
+  /**
+   * Returns the bottom most ResourcesTreeNode object. On the way from the top
+   * ResourcesTreeNode to this object, for every passed Variable object a
+   * suitable ResourcesTreeNode is passed.
+   * 
+   * @param {...module:meteoJS/modelviewer/variable.Variable} - variables
+   *   A set of Variable objects.
+   * @returns {undefined|module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode}
+   *   Bottom most object.
+   */
+  findNodeByVariables(...variables) {
+    let v = undefined;
+    variables.forEach(variable => {
+      if (variable.variableCollection === this.variableCollection)
+        v = variable;
+    });
+    if (v === undefined)
+      return undefined;
+    const child = this._children.get(v);
+    if (child !== undefined) {
+      const result = child.findNodeByVariables(...variables);
+      return (result === undefined) ? this : result;
+    }
+    return this;
+  }
+}
+export default ResourcesTreeNode;
+
+
+
+ +
+
+
+ +
+ + + + + + + + + \ No newline at end of file diff --git a/doc/modelviewer_TimeVariable.js.html b/doc/modelviewer_TimeVariable.js.html index 02aac7c9..4e041cb7 100644 --- a/doc/modelviewer_TimeVariable.js.html +++ b/doc/modelviewer_TimeVariable.js.html @@ -100,7 +100,7 @@

Source: modelviewer/TimeVariable.js

diff --git a/doc/modelviewer_Variable.js.html b/doc/modelviewer_Variable.js.html index f07ec1cf..5f6f6265 100644 --- a/doc/modelviewer_Variable.js.html +++ b/doc/modelviewer_Variable.js.html @@ -91,7 +91,7 @@

Source: modelviewer/Variable.js

diff --git a/doc/modelviewer_VariableCollection.js.html b/doc/modelviewer_VariableCollection.js.html index 29d0efc0..acb33de1 100644 --- a/doc/modelviewer_VariableCollection.js.html +++ b/doc/modelviewer_VariableCollection.js.html @@ -163,7 +163,7 @@

Source: modelviewer/VariableCollection.js

diff --git a/doc/modelviewer_display_SelectNavigation.js.html b/doc/modelviewer_display_SelectNavigation.js.html index d093473b..6f6fc3c3 100644 --- a/doc/modelviewer_display_SelectNavigation.js.html +++ b/doc/modelviewer_display_SelectNavigation.js.html @@ -142,7 +142,7 @@

Source: modelviewer/display/SelectNavigation.js

diff --git a/doc/modelviewer_display_Simple.js.html b/doc/modelviewer_display_Simple.js.html index 4b89d572..d111edce 100644 --- a/doc/modelviewer_display_Simple.js.html +++ b/doc/modelviewer_display_Simple.js.html @@ -132,7 +132,7 @@

Source: modelviewer/display/Simple.js

diff --git a/doc/modelviewer_resource_Image.js.html b/doc/modelviewer_resource_Image.js.html index b69a15d1..77b51ae5 100644 --- a/doc/modelviewer_resource_Image.js.html +++ b/doc/modelviewer_resource_Image.js.html @@ -89,7 +89,7 @@

Source: modelviewer/resource/Image.js

diff --git a/doc/modelviewer_resource_Sounding.js.html b/doc/modelviewer_resource_Sounding.js.html index 9a71a5bc..7c7ffcea 100644 --- a/doc/modelviewer_resource_Sounding.js.html +++ b/doc/modelviewer_resource_Sounding.js.html @@ -93,7 +93,7 @@

Source: modelviewer/resource/Sounding.js

diff --git a/doc/module-meteoJS.html b/doc/module-meteoJS.html index dd540fa5..582a5dbb 100644 --- a/doc/module-meteoJS.html +++ b/doc/module-meteoJS.html @@ -44,7 +44,7 @@

meteoJS

diff --git a/doc/module-meteoJS_base_collection.Collection.html b/doc/module-meteoJS_base_collection.Collection.html index 7e3ddd5e..61051fe0 100644 --- a/doc/module-meteoJS_base_collection.Collection.html +++ b/doc/module-meteoJS_base_collection.Collection.html @@ -420,7 +420,7 @@

Parameter

diff --git a/doc/module-meteoJS_base_collection.html b/doc/module-meteoJS_base_collection.html index 563d19d0..cf894699 100644 --- a/doc/module-meteoJS_base_collection.html +++ b/doc/module-meteoJS_base_collection.html @@ -320,7 +320,7 @@

Parameters

diff --git a/doc/module-meteoJS_base_named.Named.html b/doc/module-meteoJS_base_named.Named.html index 19c46dae..70f1f9fe 100644 --- a/doc/module-meteoJS_base_named.Named.html +++ b/doc/module-meteoJS_base_named.Named.html @@ -315,7 +315,7 @@

Parameters

diff --git a/doc/module-meteoJS_base_named.html b/doc/module-meteoJS_base_named.html index d013bf04..be700ed3 100644 --- a/doc/module-meteoJS_base_named.html +++ b/doc/module-meteoJS_base_named.html @@ -146,7 +146,7 @@

Properties

diff --git a/doc/module-meteoJS_base_namedCollection.NamedCollection.html b/doc/module-meteoJS_base_namedCollection.NamedCollection.html index 89b2b9ac..fb724f93 100644 --- a/doc/module-meteoJS_base_namedCollection.NamedCollection.html +++ b/doc/module-meteoJS_base_namedCollection.NamedCollection.html @@ -646,7 +646,7 @@

Parameters

diff --git a/doc/module-meteoJS_base_namedCollection.html b/doc/module-meteoJS_base_namedCollection.html index 4d146beb..df5f83a9 100644 --- a/doc/module-meteoJS_base_namedCollection.html +++ b/doc/module-meteoJS_base_namedCollection.html @@ -146,7 +146,7 @@

Properties

diff --git a/doc/module-meteoJS_base_unique.Unique.html b/doc/module-meteoJS_base_unique.Unique.html index 3b981194..fe5f90e1 100644 --- a/doc/module-meteoJS_base_unique.Unique.html +++ b/doc/module-meteoJS_base_unique.Unique.html @@ -156,7 +156,7 @@

Parameter

diff --git a/doc/module-meteoJS_base_unique.html b/doc/module-meteoJS_base_unique.html index a1113a8c..4e47598f 100644 --- a/doc/module-meteoJS_base_unique.html +++ b/doc/module-meteoJS_base_unique.html @@ -118,7 +118,7 @@

Property

diff --git a/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html b/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html index 88bc6663..9264d1ad 100644 --- a/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html +++ b/doc/module-meteoJS_base_uniquenamed.UniqueNamed.html @@ -342,7 +342,7 @@

Parameters

diff --git a/doc/module-meteoJS_base_uniquenamed.html b/doc/module-meteoJS_base_uniquenamed.html index 29b8c8fe..6b03c062 100644 --- a/doc/module-meteoJS_base_uniquenamed.html +++ b/doc/module-meteoJS_base_uniquenamed.html @@ -118,7 +118,7 @@

Property

diff --git a/doc/module-meteoJS_calc.html b/doc/module-meteoJS_calc.html index 3e03ad94..ee57e148 100644 --- a/doc/module-meteoJS_calc.html +++ b/doc/module-meteoJS_calc.html @@ -1319,7 +1319,7 @@

Parameter

diff --git a/doc/module-meteoJS_events.html b/doc/module-meteoJS_events.html index a638e9d4..8350d82a 100644 --- a/doc/module-meteoJS_events.html +++ b/doc/module-meteoJS_events.html @@ -363,7 +363,7 @@

Parameters

diff --git a/doc/module-meteoJS_modelviewer.Modelviewer.html b/doc/module-meteoJS_modelviewer.Modelviewer.html index 80e8ddf5..d8323a74 100644 --- a/doc/module-meteoJS_modelviewer.Modelviewer.html +++ b/doc/module-meteoJS_modelviewer.Modelviewer.html @@ -210,7 +210,7 @@

Parameter

diff --git a/doc/module-meteoJS_modelviewer.html b/doc/module-meteoJS_modelviewer.html index f17840cd..5c9dea04 100644 --- a/doc/module-meteoJS_modelviewer.html +++ b/doc/module-meteoJS_modelviewer.html @@ -238,7 +238,7 @@

Parameters

diff --git a/doc/module-meteoJS_modelviewer_container.Container.html b/doc/module-meteoJS_modelviewer_container.Container.html index 1d7cda77..21d012bc 100644 --- a/doc/module-meteoJS_modelviewer_container.Container.html +++ b/doc/module-meteoJS_modelviewer_container.Container.html @@ -26,7 +26,7 @@
@@ -261,6 +266,44 @@

getMirrorsFromObject with module:meteoJS/modelviewer/container.Container keys and Array of module:meteoJS/modelviewer/variableCollection.VariableCollection properties 

+

getSelectedVariable(variableCollection) → module:meteoJS/modelviewer/variable.Variable

+

Returns the selected Variable of a VariableCollection. If no selected + variable exists, an empty Variable-Object will be returned.

+
+

Parameter

+ + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

variableCollection

+
+

module:meteoJS/modelviewer/variableCollection.VariableCollection

+
+

 

+
+

VariableCollection.

+
+
+
+
Returns
+
+

module:meteoJS/modelviewer/variable.Variable The selected Variable of the colleciton.

+
+

mirrorsFrom([container][, variableCollections])

Mirrors (parts of) the displayVariables form another container. With this feature, e.g. in different containers can be viewed plots of different @@ -360,7 +403,7 @@

Parameter

diff --git a/doc/module-meteoJS_modelviewer_container.html b/doc/module-meteoJS_modelviewer_container.html index 4c8b941d..930ac776 100644 --- a/doc/module-meteoJS_modelviewer_container.html +++ b/doc/module-meteoJS_modelviewer_container.html @@ -620,7 +620,7 @@

change:visibleRe
diff --git a/doc/module-meteoJS_modelviewer_display.Display.html b/doc/module-meteoJS_modelviewer_display.Display.html index 51600728..26a2e06f 100644 --- a/doc/module-meteoJS_modelviewer_display.Display.html +++ b/doc/module-meteoJS_modelviewer_display.Display.html @@ -156,7 +156,7 @@

render<
diff --git a/doc/module-meteoJS_modelviewer_display.html b/doc/module-meteoJS_modelviewer_display.html index c42aaebd..3ac1bf39 100644 --- a/doc/module-meteoJS_modelviewer_display.html +++ b/doc/module-meteoJS_modelviewer_display.html @@ -279,7 +279,7 @@

init:display

diff --git a/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html b/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html index 3d29c5c9..3b7157c8 100644 --- a/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html +++ b/doc/module-meteoJS_modelviewer_display_selectNavigation.SelectNavigation.html @@ -69,7 +69,7 @@

onInit<
diff --git a/doc/module-meteoJS_modelviewer_display_selectNavigation.html b/doc/module-meteoJS_modelviewer_display_selectNavigation.html index a24a54b4..415581bc 100644 --- a/doc/module-meteoJS_modelviewer_display_selectNavigation.html +++ b/doc/module-meteoJS_modelviewer_display_selectNavigation.html @@ -64,7 +64,7 @@

diff --git a/doc/module-meteoJS_modelviewer_display_simple.Simple.html b/doc/module-meteoJS_modelviewer_display_simple.Simple.html index ce736752..d7b246df 100644 --- a/doc/module-meteoJS_modelviewer_display_simple.Simple.html +++ b/doc/module-meteoJS_modelviewer_display_simple.Simple.html @@ -106,7 +106,7 @@

onInit<
diff --git a/doc/module-meteoJS_modelviewer_display_simple.html b/doc/module-meteoJS_modelviewer_display_simple.html index 535e1abe..e5507325 100644 --- a/doc/module-meteoJS_modelviewer_display_simple.html +++ b/doc/module-meteoJS_modelviewer_display_simple.html @@ -64,7 +64,7 @@

Simple diff --git a/doc/module-meteoJS_modelviewer_node.Node.html b/doc/module-meteoJS_modelviewer_node.Node.html index a84b9375..b8ad678f 100644 --- a/doc/module-meteoJS_modelviewer_node.Node.html +++ b/doc/module-meteoJS_modelviewer_node.Node.html @@ -26,7 +26,7 @@