Namespace: tree

$scope. tree

Object Tree with field function custom

Source:

Members


<static> for_all_descendants :$scope.for_all_descendants

Type:
Source:

Methods


<static> add_node(parent, new_node [, index] [, parent_auto_expand])

Add node into parent

Parameters:
Name Type Argument Default Description
parent Node | Array.<Node> | undefined
new_node Node
index undefined | int <optional>
parent_auto_expand boolean <optional>
false
Source:
Returns:
Type
Object

<static> add_node_root(new_node)

Add node into root

Parameters:
Name Type Description
new_node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> collapse_all()

Collapse all node

Source:

<static> collapse_all_parents(node)

Collapse all parents of node selecting

Parameters:
Name Type Description
node Node | undefined
Source:

<static> collapse_node(node)

Collapse node (or node selecting)

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> deselect_node()

Deselect node

Source:
Returns:
Type
Node | undefined

<static> expand_all()

Expand all node

Source:

<static> expand_all_parents(node)

Expand all parents of node selecting

Parameters:
Name Type Description
node Node | undefined
Source:

<static> expand_node(node)

Expand node (or node selecting)

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> for_all_ancestors(node, fn)

Foreach ancestors in node

Parameters:
Name Type Description
node Node | undefined
fn fnSetExpand

Function callback

Source:
Returns:
Type
boolean

<static> get_children(node)

Get children of node (or selecting)

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
undefined | Array.<Node>

<static> get_closest_ancestor_next_sibling(node)

Get closest ancestor next sibling

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> get_first_child(node)

Get first child

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> get_first_node()

Get node first in root (or selecting)

Source:
Returns:
Type
Node | undefined

<static> get_next_node(node)

Get next node

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> get_next_sibling(node)

Get next sibling

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> get_parent(node)

Get parent of node selecting

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> get_prev_node(node)

Get previous node

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> get_prev_sibling(node)

Get previous sibling

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> get_selected_node()

Get node selected

Source:
Returns:
Type
Node | undefined

<static> get_siblings(node)

Get siblings

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
undefined | Array.<Node>

<static> reload_data()

Reload data in scope

Source:
Returns:
Type
Node | Array.<Node> | undefined

<static> remove_node(node)

Remove node (or node selecting)

Parameters:
Name Type Description
node Node | undefined

If node is Object then delete node else delete node selecting

Source:

<static> select_first_node()

Select first node

Source:
Returns:
Type
Node | undefined

<static> select_next_node(node)

Select next node

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> select_next_sibling(node)

Select next sibling

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> select_node(node)

Select node in tree

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> select_parent_node(node)

Select parent node

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> select_prev_node(node)

Select previous node

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
Node | undefined

<static> select_prev_sibling(node)

Select previous sibling

Parameters:
Name Type Description
node Node | undefined
Source:
Returns:
Type
* | Object