Class: Actions

Actions

The Action creator class for FlexLayout model actions

Constructor

new Actions()

Source:

Methods

(static) addNode(json, toNodeId, location, index) → {Object}

Adds a tab node to the given tabset node
Parameters:
Name Type Description
json
toNodeId the new tab node will be added to the tabset with this node id
location the location where the new tab will be added, one of the DockLocation enum values.
index for docking to the center this value is the index of the tab, use -1 to add to the end.
Source:
Returns:
Type
Object

(static) adjustSplit(splitSpec) → {Object}

Adjust the splitter between two tabsets
Parameters:
Name Type Description
splitSpec an object the defines the new split between two tabsets, see example below.
Source:
Returns:
Type
Object
Example
Actions.adjustSplit({node1: "1", weight1:30, pixelWidth1:300, node2: "2", weight2:70, pixelWidth2:700});

(static) deleteTab(tabNodeId) → {Object}

Deletes a tab node from the layout
Parameters:
Name Type Description
tabNodeId the id of the node to delete
Source:
Returns:
Type
Object

(static) maximizeToggle(tabsetNodeId) → {Object}

Maximizes the given tabset
Parameters:
Name Type Description
tabsetNodeId the id of the tabset to maximize
Source:
Returns:
Type
Object

(static) moveNode(fromNodeId, toNodeId, location, index) → {Object}

Moves a noded (tab or tabset) from one location to another
Parameters:
Name Type Description
fromNodeId the id of the node to move
toNodeId the id of the node to receive the moved node
location the location where the moved node will be added, one of the DockLocation enum values.
index for docking to the center this value is the index of the tab, use -1 to add to the end.
Source:
Returns:
Type
Object

(static) renameTab(tabNodeId, text) → {Object}

Change the given nodes tab text
Parameters:
Name Type Description
tabNodeId the id of the node to rename
text the test of the tab
Source:
Returns:
Type
Object

(static) selectTab(tabNodeId) → {Object}

Selects the given tab in its parent tabset
Parameters:
Name Type Description
tabNodeId the id of the node to set selected
Source:
Returns:
Type
Object

(static) setActiveTabset(tabsetNodeId) → {Object}

Set the given tabset node as the active tabset
Parameters:
Name Type Description
tabsetNodeId the id of the tabset node to set as active
Source:
Returns:
Type
Object

(static) updateModelAttributes(attributes) → {Object}

Updates the global model jsone attributes
Parameters:
Name Type Description
attributes the json for the model attributes to update (merge into the existing attributes)
Source:
Returns:
Type
Object

(static) updateNodeAttributes(nodeId, attributes) → {Object}

Updates the given nodes json attributes
Parameters:
Name Type Description
nodeId the id of the node to update
attributes the json attributes to update (merge with the existing attributes)
Source:
Returns:
Type
Object