meteoJS/modelviewer/container . Container
Source: modelviewer/
This object represents a container, that displays one resource. Via displayVariables the appropriate resource is chosen.
Properties
new Container([options])
Parameter
Name | Type | Optional | Description |
---|---|---|---|
options |
|
Yes |
Options. |
Properties
containerNode (undefined or external:HTMLElement)
DOM node to append container's output.
display (undefined or module:meteoJS/modelviewer/display.Display)
Display object to generate dom output.
displayVariables Set containing module:meteoJS/modelviewer/variable.Variable
These variables define, which resource is displayed. If adaptSuitableResource is not enabled, then the displayed resource is exactly defined by these variables (and additionally the datetime selected by the timeline object). If adaptSuitableResource is enabled, then a resource is displayed, that matches the variables but can be defined by additional variables. Setter allows Set or Array. Getter returns always Set.
enabledTimes Array of Date
Returns an array of times (for the timeline). For all of these times, there exists resources which match with the current displayVariables.
id unknown
Id.
- Inherited from
- module:meteoJS/base/unique.Unique#id
modelviewer (undefined or module:meteoJS/modelviewer.Modelviewer)
This container belongs to this modelviewer object.
selectedVariables Set containing module:meteoJS/modelviewer/variable.Variable
These variables define excactly, which resource will be displayed. These variables are retrieved from the available resources and displayVariables. Together with the selected time in the timeline, the resource to display is uniquely defined. If adaptSuitableResource is not enabled, selectedVariables is equal to displayVariables.
visibleResource module:meteoJS/modelviewer/resource.Resource
Currently visible resource. Could be an empty resource.
Methods
exchangeDisplayVariable(variables) → module:meteoJS/modelviewer/container.Container
Exchanges variables in displayVariables. The variable with the same Collection will be exchanged. If none is found, the variable will be added.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
variables |
Set containing module:meteoJS/modelviewer/variable.Variable |
|
Add these variables to the set of displayVariables. |
getMirrorsFrom() → Object with module:meteoJS/modelviewer/container.Container keys and Array of module:meteoJS/modelviewer/variableCollection.VariableCollection properties
Get all containers, from which this container mirrors some variables from. As values of the returned Map-Object an array with the mirrored VariableColletions is returned.
- Returns
-
Object 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
Name | Type | Optional | Description |
---|---|---|---|
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 models. If you change e.g. the field in the first container, all other containers, that mirrors form this container, will also change the viewed content. It is possible to mirror different VariableCollections from different containers.
Parameters
Name | Type | Optional | Description |
---|---|---|---|
container |
Yes |
Mirrors from this container. |
|
variableCollections |
Array of module:meteoJS/modelviewer/variableCollection.VariableCollection |
Yes |
The displayVariables of these VariableCollections are mirrored. If omitted, all VariableCollections are mirrored. |
setId(id)
Fired, wenn id-setter is called.
Parameter
Name | Type | Optional | Description |
---|---|---|---|
id |
|
|
Id. |
- Inherited from
- module:meteoJS/base/unique.Unique#setId