Hi, we want to achieve link functionality in our diagram as shown in the below figure-:
We have tried a few properties in our diagram to achieve the link functionality as shown in the above figure. Here are our code -:
$(go.Link,
{ selectable: true, selectionAdornmentTemplate: ProcesslinkSelectionAdornmentTemplate }, { relinkableFrom: true, relinkableTo: true, reshapable: true }, {
routing: go.Link.Orthogonal,
curve: go.Link.Bezier,
curviness: 0,
smoothness:1,
adjusting: go.Link.Stretch,
fromSpot: go.Spot.AllSides, toSpot: go.Spot.AllSides,
},
From this code we are unable to achieve the expected output, Here is snippets of our output-:
The functionality we want to achieve-:
-
- If Nodes are arranging vertically straight then links should follow a straight path.
-
- If Nodes are arranging vertically but not in a straight line then the link should follow the curve path with the shortest path (As per defined figure).
-
- If another node is drag-drop in b/w two connected nodes then the link should follow avoid nodes with curve path (with respective to drag-drop node).