Hi as you can see as i am dragging the node from outside of canvas and dropping onto link.
I did this by the help of mouseEnter and mouseOut event.I hold the
from and to node into variable and use that once that node i made on canvas.By the help of firing dropontoLink event manually.
.When i fire dropOntolink function manually.My diagram views get bad for fraction of sec.
May 31, 2018, 2:23pm
If you have not, I suggest you model your samples behavior on this sample, which does something very similar:
Page Not Found -- Northwoods Software
your given link is not working.
The link you shared with me is using
But actually in shared video you can see i am dragging the node from outside the canvas(
That is why your given link will not work for me.
June 4, 2018, 1:42pm
You probably need to combine that with the something like the “drop” listener in the
HTML Drag and Drop sample.
We aren’t familiar with JSTree, but I imagine you want to convert some HTML to a GoJS node first, then you can see if the drop location is on a link, then call something like
Exactly once node is made on canvas i explicitly call
dropOntoLink function.And it works well too.
But issue is that when node is injected on desired link.
For fraction of second diagram looks bad.
June 4, 2018, 2:54pm
Ok, you have a couple options here:
Assign a location to the newly created node data as you create it so the node won’t animate from some strange location
Turn off the AnimationManager
Here’s an example that uses a drop location:
Thanks a lot Jhardy,turn off the AnimationManager works for me.
I made changes in
Is it possible to Turn off/Turn on animation manager for specific drag drop transaction.
June 5, 2018, 1:17pm
You could call
AnimationManager.stopAnimation just after committing the transaction which adds the node/links. I’ve updated the codepen to reflect this.
My graph links get break for a last transaction.This thing happen only when i drop inside the group.
And when i expand collapse the group UI again become normal.
June 7, 2018, 1:27pm
Are you making sure to set the group for the newly dropped node before adding it to the diagram? You can see the updated codepen above which now includes a group.
Jhardy data is valid that’s why when we expand collapse the group it become normal.
One thing when i stop the animation manager this problem resolve.
But when i stop animation some time drag drop node can not link.
June 8, 2018, 1:08pm
Well, I don’t see that behavior in the codepen, so I’m not sure what’s going on in your app. You could still use the other option of giving the dropped node a location if you don’t want to use