bumbeishvili / org-chart

Highly customizable org chart. Integrations available for Angular, React, Vue
https://stackblitz.com/edit/web-platform-o5t1ha
MIT License
928 stars 330 forks source link

Is it possible to add a node to the chart as a parent (ex: add supervisor) #423

Open cthacker-udel opened 3 months ago

cthacker-udel commented 3 months ago

Instead of adding the node as the child, is it possible to add it as the parent of the currently selected node.

I mean "currently selected node", because I have this cta buttons that appear when hovering over a node, one of them being the "+" button. I want to present in the add node Modal component, the option to set the new node as the parent of the node upon which you pressed the "+" with, if that makes any sense.

I sent this as a question because I'm unsure if it's been answered before, or if that functionality already exists.

cthacker-udel commented 3 months ago

Also, side-note: It seems that the Remove Node link in the README appears to be pointing to an addNode functionality example, not a removeNode example.

1) Go to README 2) Click on Remove Node 3) View that the interactive button is Add Node to the Root, which does not have any correlation with removal. Also the button onClick uses chart.addNode

PPS: Please merge this https://github.com/bumbeishvili/org-chart/pull/347, the issue referenced in the PR is currently causing quite a headache with my implementation, would help out a lot, thanks!