Auto Layout between ports

I’m connecting links between ports.
The ports are floating on a rectangular shape and i set their Spot location manually.
But when i run auto layout, they don’t participate in the algorithm and sometimes the algorithm creates a link that crosses the node in order to get to port, instead of moving the port to a nearest location.
Can i tell GOJS to relocate the ports during auto layout ?

None of the predefined Layout classes are supposed to modify anything about laid-out Nodes except their location – they do not modify the size of any object in a Node or the arrangement of any objects in a Node.

Now you can certainly define layouts that do so – an example is Tree Map. But I think it would be very unusual for a layout to rearrange ports on nodes. For example, that would be bad news for apps like Data Flow Diagram.

Are you sure that you need to use multiple ports rather than just using a single port and having the link routing automatically compute where the end of the link connects with the port?

Yes,
I have to have multiple ports.
For example, if a router is connected via 4 Ethernet ports to 4 different devices, i have to show the connectivity of all ports and i also monitor each port seperatly.
I’ll manage.
Thanks

LayeredDigraphLayout respects ports, but of course it does not modify the relative positions of any ports.

You could override whatever layout that you are using so that in a last pass you modify the positions of ports in order to minimize cross-overs.

You mean create my custom layout ?

By modifying the results of the normal layout, yes.
http://gojs.net/latest/intro/extensions.html