I have nodes which have four ports each.
I want to add a link between two nodes programmatically, using the two ports which are closest to each other.
With the linkingTool.insertLink(), I need explicitly specify the ports though.
Is there any functionality in gojs I can use to automatically determine the clostest ports of two nodes or do I need to implement my own calculation to get the two clostest ports?
You mean a single port and go.Spot.AllSides? Good point, need to check what this would mean for us.
I believe you mean LinkingTool.insertLink? Still, I would manually need to iterate over all ports and find the ports with the shortest distance, right? Or is there some functionality in goJS which can tell me for two given nodes the two ports closest to each other?