Manages the Categories Tree.

The Leafs of the tree refer to a set of equations and constitute the categories. The Folders constitute super categories.

Implements

Constructors

Properties

_tree: any = null
contextNode: any = null
currentLeaf: any = null
data: any = null
dropSourceParent: any = null
equationMoved: any = null
id: number = 0
nodeSelected: any = null
previousLeaf: any = null
treeChanged: any = null
treeSelector: string = ""

Accessors

  • get customEquationsProxy(): any
  • A Proxy of the Custom Equations data.

    This is capable of being serialized over JSON.

    Returns any

Methods

  • Adds a Samples branch to the Categories tree.

    This routine secures against repeated insertions.

    Parameters

    • from: any

      the Categories (Custom Equations) tree as from JSON

    Returns Promise<any>

    the changed tree with added Samples

  • Converts the Custom Equations from old to new format.

    The old format has only a single equations set and no category information.

    Parameters

    • from: any

      custom equations in old or new format

    Returns any

    • custom equations in new format, enriched with a category tree
  • moveEquations moves the checked equations from a source to a target category (Leaf node).

    This method notifies Observers about the change, f.i. the datagrid panel.

    Parameters

    • from: any

      source leaf node

    • to: any

      target leaf node

    Returns void

  • Given the path string, determines and returns the appropriate node.

    Parameters

    • path: string

      the path of a node in the tree

    Returns any

    the node belonging to that path or null

  • The context menu of the tree nodes.

    We distinguish 2 context menues: one for the Leafs and one for the Folders.

    Parameters

    • e: MouseEvent
    • node: any

    Returns void

  • Given a node in the tree, determines and returns the path string.

    This serves the purpose to provide a better way to characterize the current selection.

    Parameters

    • node: any

      a node of the tree

    Returns string

    the path string belonging to that node

  • Sort routine. Sorts the whole category tree.

    Folders first, then leafs. Alphabetically in ascending order. This alternative uses traverse.

    Parameters

    • order: string = 'asc'

      the order. 'asc' for ascending

    Returns void

  • Traverses the categories tree.

    For each node in tree invokes the given function with the given arguments.

    Parameters

    • func: any

      given function

    • Rest...args: any[]

      arguments for function to modify its behavior

    Returns void