Temporary Ports with No Real Port

When we have three or more ports, we collapse the ports down to make it appear as one port with a number:


On port click, they can expand these ports to see them all:

That’s what the “expanded” property is controlling on the item array itself. The problem is that if someone starts to draw a connection to the node and the ports are in the collapsed view, we want to automatically expand the ports so they can make the connection. The code for the templates are largely the same as what’s here. There shouldn’t be any eventing happening when we do this.

The error I see from the gojs debugger is this:

Binding error: Error: PathSegment.ey must be a real number type, and not NaN or Infinity: NaN setting target property "geometry" on Shape(None)#27245 with conversion function: function squareIndexToGeoInput(i, shape) {
      var _shape$panel$panel$it, _shape$panel, _shape$panel$panel, _shape$panel$panel$it2;

The squareIndexToGeoInput is what we use to calculate the ports locations. It’s receiving NaN on the first iteration of trying to recalculate the node and ports after not making a connection.