-
Notifications
You must be signed in to change notification settings - Fork 5
Tree Renderer
Tobias Paczian edited this page Mar 29, 2018
·
1 revision

Displays a searchable, collapsible tree view. The nodes displayed in this tree must be an acyclic, directed, rooted graph.
- target (HTML Container Element) - Element to render the table in.
-
width (INT) - Width of the tree container in pixels. Default is
366. -
height (INT) - Height of the tree containerin pixels. Default is
366. -
indent (INT) - Number of pixels to indent per level. Default is
10. -
showCollapseAllButton (BOOLEAN) - Turn the collapse all button on / off. Default is
true. -
showExpandAllButton (BOOLEAN) - Turn the expand all button on / off. Default is
true. -
showSearchBar (BOOLEAN) - Turn the search bar on / off. Default is
true. -
showSynonymsInDescription (BOOLEAN) - Turn the display of the synonym list in the hover over description on / off. Default is
true. -
showTooltip (BOOLEAN) - Turn the display of the tooltip on / off. Default is
true. -
showGoButton (BOOLEAN) - Turn the display of the "go" button on / off. Default is
true. -
buttonText (STRING) - Text of the go button. Default is
go. -
sortNodes (BOOLEAN) - Sort child nodes alphabetically. Default is
false. -
searchDescription (BOOLEAN) - Include the descriptions in the search. Default is
false. -
tooltipStyle (STRING) - Can be either
popoverorplain, depending on how intrusive the tooltip should be. Default ispopover. - callback (FUNCTION) - Function called when a node is selected. Passes the node object as a parameter.
-
data (OBJECT) - Content data structure. The top level must have the following attributes:
- showRoot (BOOLEAN) - Display the root node?
- rootNode (STRING) - The hash key of the root node in the node structure
-
nodes (HASH) - Hash of content nodes. Each node must have the following attributes:
- id (STRING) - This must be the same as the hashkey of this node
- label (STRING) - The string to be displayed at this node
- description (STRING) - The text displayed in the hover over of the node
- childNodes (ARRAY) - Array of node ids of child nodes of this node
-
expanded (BOOLEAN - optional) - Sets the initial expansion of the node. Default is
false. The root node cannot be collapsed if hidden. - synonyms (ARRAY - optional) - List of strings of synonyms for this node. These will cause a hit in the search.
Note: All functions require the index of the renderer to be passed as the first parameter.
- selectedNode - Returns the currently selected node object or null if no node is selected.
- goTo (nodeId) - Selects the node defined by nodeId, collapses all nodes and then expands all parents of the selected node.