Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Adding nodes
posted

Hello,

 

Am glad that we can edit/add/remove nodes from the igTree now. Thanks for that!!

Can we have more control while adding a node to the tree? What exactly am looking at it that, a new node gets created to the bottom of the tree hierarchy now. Since I have all the nodes under a parent node in sorted order, can I somehow create the new tree node under some other node of the same parent?

 

Thank you,
Wajid.

Parents
No Data
Reply
  • 5105
    Verified Answer
    Offline posted

    Hi there Wajid,

    Yes there is. The addNode method takes up to three parameters:

    .igTree( "addNode", node:object, [parent:object], [nodeIndex:number] );

    The second parameter is the parent node you want to add under. The third parameter is the index at which to insert the node. If those are left blank, then the new node would be added as the last node at the root level.

    I hope this helps!

Children
No Data