Linking after setting fromSpot & toSpot (for Link Shifting tool)

Hello,

After running the Link Shifting tool I had to set fromSpot and toSpot to go.Spot.AllSides for the tool to work - then a new problem appeared.

As you can see from those screenshots, links were starting from the same (on a given side) port, after setting mentioned properties they are automatically making this “gap” when linking occurs.

We would like to keep the old behavior, is it possible?

Try setting Node.portSpreading to go.Node.SpreadingNone.

That did the trick, thank you!

Is there a way of setting some kind of resistance/gravity to the middle point (on each side) while dragging the link shifting anchor point?

That would require customizing the LinkShiftingTool to do what you want. I suspect you could modify the LinkShiftingTool.doReshape method to return the center point whenever it’s within x pixels.