Links are getting distorted for fraction of seconds

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.

Question
.When i fire dropOntolink function manually.My diagram views get bad for fraction of sec.

onds.

If you have not, I suggest you model your samples behavior on this sample, which does something very similar: Page Not Found -- Northwoods Software

hi,

your given link is not working.

Giving 404

Try this: Flowgrammer

The link you shared with me is using dropOnToLink event.

But actually in shared video you can see i am dragging the node from outside the canvas(JsTree).

That is why your given link will not work for me.

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 dropOntoLink.

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.

Issue:
For fraction of second diagram looks bad.

Ok, you have a couple options here:

  1. Assign a location to the newly created node data as you create it so the node won’t animate from some strange location
  2. 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 go.diagram configuration.

Query:
Is it possible to Turn off/Turn on animation manager for specific drag drop transaction.

You could call AnimationManager.stopAnimation just after committing the transaction which adds the node/links. I’ve updated the codepen to reflect this.

Hi,
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.

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.

Yes 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.

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 stopAnimation.