Class: Model

Model

Class containing the Tree of Nodes used by the FlexLayout component

Constructor

new Model()

'private' constructor. Use the static method Model.fromJson(json) to create a model
Source:

Methods

(static) fromJson(json) → {Model}

Loads the model from the given json object
Parameters:
Name Type Description
json the json model to load
Source:
Returns:
a new Model object
Type
Model

getActiveTabset() → {null|TabSetNode}

Get the currently active tabset node
Source:
Returns:
Type
null | TabSetNode

getNodeById(id) → {null|Node}

Gets a node by its id
Parameters:
Name Type Description
id the id to find
Source:
Returns:
Type
null | Node

getRoot() → {RowNode}

Gets the root RowNode of the model
Source:
Returns:
Type
RowNode

toJson() → {*}

Converts the model to a json object
Source:
Returns:
json object that represents this model
Type
*

visitNodes(fn)

Visits all the nodes in the model and calls the given function for each
Parameters:
Name Type Description
fn a function that takes visited node and a integer level as parameters
Source: