Can I add control points to link?

I think you misunderstood.
Plz see this video:https://www.useloom.com/share/07da42ce3b79460e87713f948bbb73c2
In your demo (clickInsertsPoint), when I insert a point, reshape link and delete the point, the link ports remains in the same position instead of going back to initial location.
It should go back to initial location so the link should be shortest.

I’d like to same feature as this video: https://www.useloom.com/share/e11e599e34ed4ad9a3bd311c884e9d9f
See? In funnelytics, link ports position get refreshed when I deleted a point.

I suppose if afterwards there are only two points in the route you could call Link.invalidateRoute. Link | GoJS API

But presumably you would not want to do that if you removed a point in the middle of the route.

I tried invalidateRoute() but it didn’t work at all.
Plz send me code snippet which works exactly like funnelytics.
https://www.useloom.com/share/e11e599e34ed4ad9a3bd311c884e9d9f

Again, in below demo, deleting a point in the middle of the route doesn’t make link rearranged to be shortest between 2 nodes.
Minimal GoJS Sample
You can confirm in this video: https://www.useloom.com/share/07da42ce3b79460e87713f948bbb73c2

I don’t like this. So I want same behavior as in this funnelytics video:
https://www.useloom.com/share/e11e599e34ed4ad9a3bd311c884e9d9f

How to do this?
Link.invalidateRoute() doesn’t work.
Plz help.

It works when I try it:

              e.diagram.commit(function(diag) {
                link.points = pts;
                if (pts.count < 3) link.invalidateRoute();
              }, "deleted point from link route");

GoJS is meant to be used by programmers. We cannot implement every feature that you want for your app. GoJS has a lot of functionality and power so that you can create whatever UI you like. But you need to learn it so that you can use it to do what you want.

1 Like