Skip to content

How to add node to top of clicked node #170

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rameshwarcode opened this issue Apr 28, 2022 · 2 comments
Open

How to add node to top of clicked node #170

rameshwarcode opened this issue Apr 28, 2022 · 2 comments

Comments

@rameshwarcode
Copy link

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

@knutesears
Copy link

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.

@egor-progger
Copy link

I ported treantjs to Typescript. You can try https://www.npmjs.com/package/pointlinejs
I created prototype for add parent node for selected node, you can see example here https://github.com/egor-progger/pointlinejs/tree/master/src/examples/action-buttons.
I am going to add in dialog fields where it will be possible put title, text, contact for new node.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants