Is set when the input device is hovered over a node
SVG
Check if cursor is over the SVG element
SVG
SVG
SVG
Root
Event handler for click on a chevron
Event handler for clicking on a node's icon
This is a quick helper function to create custom action icons.
Initializes the tree component - created basic markup, loads and renders data
Adds missing SVG nodes
Displays a notification message and refresh nodes
Fetch icon from Icon API and store it in this.icons
If the link target is the first child, set the group identifier. The group with this id is used for grouping the siblings, thus the identifier uses the stateIdentifier of the link source item.
Returns icon's href attribute value
Returns icon's href attribute value
Returns a SVG path's 'd' attribute value
Returns a 'transform' attribute value for the node background element (absolute positioning)
Computes the tree node-bg class
Returns a 'transform' attribute value for the node background element (absolute positioning)
Finds node by its stateIdentifier (e.g. "0_360")
Return the DOM element of a tree node
Returns a 'transform' attribute value for the tree element (absolute positioning)
Returns an array of selected nodes
Add keydown handling to allow keyboard navigation inside the tree
Updates node's data to hide/collapse children
Check whether node can be selected. In some cases (e.g. selecting a parent) it should not be possible to select element (as it's own parent).
Loads tree data (json) from configured url
node background events
node background events
Filters out invisible nodes (collapsed) from the full dataset (this.rootNode) and enriches dataset with additional properties Visible dataset is stored in this.data
Refresh view with new data
Delete old tree and create new one
If node is at the top of the viewport and direction is up, scroll up by the height of one item If node is at the bottom of the viewport and direction is down, scroll down by the height of one item
Node selection logic (triggered by different events) This represents a dummy method and is usually overridden The second argument can be interpreted by the listened events to e.g. not avoid reloading the content frame and instead used for just updating the state within the tree
Updates the expanded state of the DOM element that belongs to the node. This is required because the node is not recreated on update and thus the change in the expanded state of the node data is not represented in DOM on hideChildren and showChildren.
Set parameters like node parents, parentsStateIdentifier, checked. Usually called when data is loaded initially or replaced completely.
Updates node's data to show/expand children
Make the DOM element given as parameter focusable and focus it
Make the DOM element of the node given as parameter focusable and focus it
Renders links(lines) between parent and child nodes and is also used for grouping the children The line element of the first child is used as role=group node to group the children programmatically
Ensure to update the actions column to stick to the very end
Updates variables used for visible nodes calculation
Renders the subset of the tree nodes fitting the viewport (adding, modifying and removing SVG nodes)
Generated using TypeDoc
SVG container wrapping all .nodes, .links, .nodes-bg elements