How to dynamically add a node before or after the selected node without redrawing graph again ?
Suppose i have Graph with following nodes
Node1
Node2
Node3 ->(Currently Selected)
Node4
Node5
and a button outside the flowchart , now on clicking this button a node get added before/after the selected node.
walter
April 12, 2018, 11:25am
#2
I assume you are calling Model.addNodeData , yes?
What do you mean by “before or after the selected node”?
Yes i am using Model.addNodeData
I am able to create node but don’t know how add it after selected node.Please see image
walter
April 12, 2018, 12:40pm
#4
But your app is already doing that when the user drops the node onto a link. I suspect you started from the Flowgrammer sample, Flowgrammer . It has that functionality implemented in the Link.mouseDrop event handler, which is the dropOntoLink
function.
All i want on button click a node automatically get added in flow chart just below the selected node.
Here i have to manually drop node over the link
walter
April 12, 2018, 2:29pm
#7
Did you look at the implementation of the dropOntoLink
function as I suggested?