I have nodes that are using connector ports placed RightCenter with shapes that only have toSpot or fromSpot values defined as go.Spot.Right. However, it looks like these properties are being ignored, as seen here:
What Diagram.layout do you have? I’m wondering if the layout is automatically setting each Link’s Link.fromSpot and Link.toSpot, unless you tell it not to: TreeLayout.setsPortSpot, TreeLayout.setsChildPortSpot, LayeredDigraphLayout.setsPortSpots, ForceDirectedLayout.setsPortSpots
I think I am misunderstanding the meaning of “node” here. I thought a node would be like a For Each node, which in my head has three ports: the input, output, and returning loop input. Are we referring to the connector port as a “node” instead?
A “port” is a GraphObject that supports identifiable connection points for a Node. That is for the purpose of syntactic and semantic distinction of link connections.
fromSpot and toSpot control where on a port a link connection point should be.
Yes, by “node” I meant an instance of Node. Your “For Each” thing is a node. Whether it has more than the one default port whose identifier is the empty string, depends entirely on how the node template is defined. Does it set or bind any GraphObject.portId to a non-empty string?
It isn’t clear to me that your node templates need to have anything besides the default port. I would think you would want to have links coming out the side of a node or into the side of a node based on the link’s specific qualities. In your case that’s probably because you want links that “loop back” to go “around” nodes. But you don’t need to use port objects for that – just set or bind the Link.fromSpot and Link.toSpot. Which is something that could be done by the automatic layout, if that is its responsibility. I don’t know how you have customized your TreeLayout.