treant-js icon indicating copy to clipboard operation
treant-js copied to clipboard

How to add node to top of clicked node

Open rameshwarcode opened this issue 2 years ago • 2 comments

When i clicked on node i am able to add node as child of clicked node. My Requirement is: When i click on a node would like to prepend a new node to clicked node. In other words i want to add as parent (top) of the clicked node. Is there any method to do this or possible solution to this.

Thanks in advance

rameshwarcode avatar Apr 28 '22 08:04 rameshwarcode

The node already has a parent: both in the DOM and in the logical model that is the Treant object. Both are kinda tree-like. You have two parents, but I'm not sure the node can, or maybe I'm misunderstanding something about your Q.

knutesears avatar Mar 14 '24 06:03 knutesears