Class Model

Class containing the Tree of Nodes used by the FlexLayout component

Hierarchy

  • Model

Methods

  • Update the node tree by performing the given action, Actions should be generated via static methods on the Actions class

    Returns

    added Node for Actions.addNode; undefined otherwise

    Parameters

    • action: Action

      the action to perform

    Returns undefined | Node

  • Get the currently active tabset node

    Returns undefined | TabSetNode

  • Finds the first/top left tab set of the given node.

    Returns

    The first Tab Set

    Parameters

    • node: Node = ...

      The top node you want to begin searching from, deafults to the root node

    Returns Node

  • Get the currently maximized tabset node

    Returns undefined | TabSetNode

  • Gets a node by its id

    Parameters

    • id: string

      the id to find

    Returns undefined | Node

  • Gets the root RowNode of the model

    Returns

    Returns RowNode

  • Returns number

  • Returns number

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Returns boolean

  • Sets a function to allow/deny dropping a node

    Parameters

    • onAllowDrop: ((dragNode, dropInfo) => boolean)

      function that takes the drag node and DropInfo and returns true if the drop is allowed

        • (dragNode, dropInfo): boolean
        • Parameters

          Returns boolean

    Returns void

  • set callback called when a new TabSet is created. The tabNode can be undefined if it's the auto created first tabset in the root row (when the last tab is deleted, the root tabset can be recreated)

    Parameters

    Returns void

  • Converts the model to a json object

    Returns

    json object that represents this model

    Returns IJsonModel

  • Returns string

  • Visits all the nodes in the model and calls the given function for each

    Parameters

    • fn: ((node, level) => void)

      a function that takes visited node and a integer level as parameters

        • (node, level): void
        • Parameters

          • node: Node
          • level: number

          Returns void

    Returns void

  • Loads the model from the given json object

    Returns

    a new Model object

    Parameters

    Returns Model

  • Returns void

Generated using TypeDoc