meteoJS/modelviewer/container
Source: modelviewer/
Child class
Abstract types
Class
Container
Abstract types
adaptSuitableResource Object
Options to adapt a suitable resource to display.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
enabled |
boolean |
|
Enabled adapt suitable resource. |
getPossibleVariables |
|
Determines order of variables of a hierarchy level. |
|
isResourceSelected |
|
Is selectedVariables complete. |
getPossibleVariables(possibleSelectedVariables, selectedVariables) → Array of module:meteoJS/modelviewer/variable.Variable
If a suitable resource is searched, this method will be called several times.
The first argument ist a list of variables. These variables are collected of
one hierarchy level, defined by the
resources object
.
The method returns an ordered list of these passed variables (or a subset).
For these variables, further down in the hierarchy, a possible resource is
searched. If one is found, this variable will be used for selectedVariables.
Method is only used if adaptSuitableResource is enabled. Default algorythm is
to return the list in the order of the Iterator.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
possibleSelectedVariables |
|
Variables to return an ordered list. |
|
selectedVariables |
Set containing module:meteoJS/modelviewer/variable.Variable |
|
Already selected variables so far, top-down in hierarchy. |
- Returns
-
Array of module:meteoJS/modelviewer/variable.Variable
- Ordered list.
isResourceSelected(selectedVariables, lastAddedVariable) → boolean
With the passed selectedVariables, the method determines if already a suitable resource should be selected. If method returns true, the property selectedVariables will be set by the passed Set. Method used if adaptSuitableResource is enabled. Default algorythm is to return true if the Node of the lastAddedVariable contains resources.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
selectedVariables |
Set containing module:meteoJS/modelviewer/variable.Variable |
|
Selected variables so far. |
lastAddedVariable |
(undefined or module:meteoJS/modelviewer/variable.Variable) |
|
Last added variable to selectedVariables. |
- Returns
-
boolean
- True if a suitable resource should be selected with the current state of selectedVariables.
options module:meteoJS/base/unique~options
Options for constructor.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
display |
Yes |
Display object to output the container content to DOM. |
|
adaptSuitableResource |
Yes |
Options for adapt suitable resource. |
result_getSelectedVariablesWithResources Array
Properties
Name | Type | Optional | Description |
---|---|---|---|
0 |
(undefined or Set containing module:meteoJS/modelviewer/variable.Variable) |
|
|
1 |
(undefined or module:meteoJS/modelviewer/variable.Variable) |
|
Events
change:displayVariables Object
Triggered, when displayVariables is changed.
Properties
Name | Type | Optional | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
|
Options. Values in
|
change:enabledResources Object
Triggered, when visible Resource changes.
Properties
Name | Type | Optional | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
|
Options. Values in
|
change:selectedVariables Object
Triggered, when selectedVariables is changed.
Properties
Name | Type | Optional | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
|
Options. Values in
|
change:visibleResource
Triggered, when visible Resource changes.