I’m using portShiftingTool to move and connect ports.
When i use auto layout, sometimes the links are located to the left of the port (see left node) or to the right of the port (see right node).
How can i control the link location to be on the right (good) location ?
Especially, if the user moves a port , how can locate the link (progrematically) to the on the right location ?
But i have to use ports.
A port in my project represents a real physical port which is connected via cable (link in gojs) to other port.
It is a monitored entity that changes its color subject to operational state (up/down).
I’m willing to write a dedicated algorithm that computes the link location according to the port location but i have no clue how to implement it.
I think you’ll need to customize the port shifting tool to reassign the moved port’s fromSpot and toSpot based on its new location relative to the center of the node. Modify PortShiftingTool.doMouseUp.