Links overlapping and Link getting back to default shape when nodes is moved

Here i have my link, I’m expecting to achieve something where the links intersecting all together in center can get some offset around them so they dont clutter, i am able to manually move the links with reshapable handles but as soon as i reposition node the links gets back to default form and i have to reshape it again.

diagram.linkTemplate = $(

  go.Link,

  {

    relinkableFrom: true,

    relinkableTo: true,

    reshapable: true,

    routing: go.Link.Orthogonal,

    // resegmentable: true,

    curve: go.Link.JumpOver,

    corner: 20,

  },

  $(go.Shape, {

    strokeWidth: 2,

    stroke: "#5E7785",

  }),

  $(go.Shape, {

    toArrow: "Standard",

    fill: "#5E7785",

    stroke: "#5E7785",

  }),

  $(

    go.Panel,

    "Auto",

    $(go.Shape, "RoundedRectangle", {

      fill: "#5E7785",

      stroke: null,

      opacity: 0.5,

    }),

    $(

      go.TextBlock,

      "linkText",

      { margin: 3, stroke: "White" },

      new go.Binding("text", "linkText")

    )

  )

);

diagram.model.linkFromPortIdProperty = "fromPort";

diagram.model.linkToPortIdProperty = "toPort";

Capture

Try setting Link.adjusting to go.Link.End.

go.Link,

  {

    relinkableFrom: true,

    relinkableTo: true,

    reshapable: true,

    routing: go.Link.Orthogonal,

    // resegmentable: true,

    curve: go.Link.JumpOver,

    adjusting: go.Link.End,

    corner: 20,

  },

is giving similar results, almost no change. the link is no longer avoiding nodes and it is overlapping over the nodes.

You were complaining about how after reshaping the route of a Link, moving a connected Node caused the manually reshaped route to be lost.

Setting (or binding) Link.adjusting to End should prevent that from happening. Although I suppose it’s possible that a layout is doing the re-routing.