ui.tree
Hierarchy
coreui.treeRequires
ui.tree.baseFiles
implements Tree Component
Config options
It is possible to drag the movement of a node.
Defaults to: false
It is possible to drag the node movement but the node is not changed to a child node of the target node.
Defaults to: true
Defines a DOM event to be used in a UI
Defaults to: {}
Defines a template markup to be used in a UI
Defaults to: {}
Methods
Gets the index of a node that is activated in an active state.
Returns
- Integer
index
Check the parameter type of a UI method and generates an alarm when a wrong value is entered
Parameters
- name : String
Method name
- params : Array
Parameters
Adds to a child node at a specified index.
Parameters
- param1 : Array/String
index or data
- param2 : Array
null or data
Sets a callback function that is called after a UI method is run
Parameters
- name : String
Method name
- callback : Function
Returns
- Mixed
Sets a callback function that is called before a UI method is run
Parameters
- name : String
Method name
- callback : Function
Returns
- Mixed
Sets a callback function and the delay time before/after a UI method is run
Parameters
- name : String
Method name
- callback : Function
Removes all events set in a UI obejct and the DOM element
Generates a custom event. The first parameter is the type of a custom event. A function defined as an option or on method is called
Parameters
- type : String
Event type
- args : Function
Event Arguments
Returns
- Mixed
Folds up a child node at a specified index.
Parameters
- index : String
Folds up all child nodes at a specified index.
Parameters
- index : String
Gets a node at a specified index
Parameters
- index : String
Returns
- NodeObject
node
Gets all nodes at a specified index including child nodes.
Parameters
- index : String
Returns
- Array
nodes
Adds a node at a specified index.
Parameters
- index : String
- data : Array
Returns all parent nodes at a specified index.
Parameters
- index : String
Returns
- Array
nodes
Moves a node at a specified index to the target index.
Parameters
- index : String
- targetIndex : String
Removes a custom event of an applicable type or callback handler
Parameters
- type : String
Event type
A callback function defined as an on method is run when an emit method is called
Parameters
- type : String
Event type
- callback : Function
Shows a child node at a specified index.
Parameters
- index : String
Shows all child nodes at a specified index.
Parameters
- index : String
Deletes a node at a specified index.
Parameters
- index : String
Adds a node at a specified index.
Parameters
- index : String
Returns
- NodeObject
node
Dynamically defines the options of a UI
Parameters
- key : String
- value : Mixed
Dynamically defines the template method of a UI
Parameters
- name : String
Template name
- html : String
Template markup
Removes the 'active' class from a selected node and gets an instance of the specified node.
Changes to the node at a specified index.
Parameters
- index : Integer
- data : Array
Events
Event that occurs when the movement of a node is completed
Parameters
- e : Integer) index Node's index
@param {EventObject
The event object
Event that occurs when a node starts to move
Parameters
- e : Integer) index Node's index
@param {EventObject
The event object
Event that occurs when a node is hidden
Parameters
- e : NodeObject) node
@param {EventObject
The event object
Event that occurs when a node is shown
Parameters
- e : NodeObject) node
@param {EventObject
The event object
Event that occurs when a node is selected
Parameters
- e : NodeObject) node
@param {EventObject
The event object