new ResourcesTreeNode([options])

Parameter

Name Type Optional Description

options

 

Yes

Options.

Properties

read-only

node  module:meteoJS/modelviewer/node.Node

Linked Node object.

parent  (undefined or module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode)

The parent object of this ResourcesTree-Node.

read-only

variableCollection  module:meteoJS/modelviewer/variableCollection.VariableCollection

Linked VariableCollection object.

Methods

buildChildrenTreeForResource(options) → (undefined or module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode)

Build tree

Parameters

Name Type Optional Description

options

Object

 

Options.

Values in options have the following properties:

Name Type Optional Description

resource

module:meteoJS/modelviewer/resource.Resource

 

The added Resource object.

aimedNode

module:meteoJS/modelviewer/node.Node

 

The Resource object will be inserted into this Node object.

Returns

(undefined or module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode) 

findNodeByVariables(...variables) → (undefined or module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode)

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.

Parameter

Name Type Optional Description

variables

module:meteoJS/modelviewer/variable.Variable

 

variables A set of Variable objects.

Value can be repeated.

Returns

(undefined or module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode) Bottom most object.

getChildByVariable(variable) → module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode

Returns the child corresponding to the passed variable.

Parameter

Name Type Optional Description

variable

module:meteoJS/modelviewer/variable.Variable

 

Variable.

Returns

module:meteoJS/modelviewer/resourcesTreeNode.ResourcesTreeNode Child ResourcesTreeNode object for the passed variable.

removeChild()

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.