Which event comes after LayoutCompleted

I want to rearrange links which has connected to object on GOJS Canvas/Diagram. For this I have used object.invalidateConnectedLinks() method. It rearranges links but while saving I am not able to find modified points in LayoutComplted event.
OR
I observe that while moving object, its links getting automatically rearrange. Is there any way to explicitly hook that event which rearrange connected link?

Please help to resolve this prob.

What do you want to accomplish? In other words, what information are you looking for and when and why?

I think the general answer to your question is to establish a ChangedEvent listener.

Or maybe you just want to establish a TwoWay Binding on the Link.points property:

  $(go.Link,
      new go.Binding("points").makeTwoWay(),
      . . .)

Assuming you are using a GraphLinksModel, that will automatically update the link.data.points property to be an array of Points corresponding to the latest route for the link, in document coordinates.

I have already establish a TwoWay Binding in template.

  1. There are two objects with multiple links “From” and “To” direction. Some links are overlapped on each other. I just want to avoid overlapping links, it should display arranged(like Screen 2).
    Whenever adding any link between both objects, It seems like below screen (links not properly arranged).

  1. if I select Object 1 and slightly moved(change location), the connection getting re-arranged automatically.

  2. I want this functionality to re-arrange links on every time while adding new link between two Objects.
    Currently it is not properly arranged and overlapped on each other.

I am not able to find out the way to arrange links while/after creating new link.

Thanks for the explanation – I was completely misunderstanding your problem.

Try defining this function:

    function invalidateLinks(node, link, port) {
      var from = link.fromNode;
      if (from !== null) from.invalidateConnectedLinks();
      var to = link.toNode;
      if (to !== null) to.invalidateConnectedLinks();
    }

and then add these two properties on your Node template:

        { linkConnected: invalidateLinks, linkDisconnected: invalidateLinks },

hey It Works. Thanks you very much Walter.