Distribute panel space evenly

Hello,

I was wondering if there is a way to handle panel elements space distribution, so that every GraphObject takes even space, so we end up with the same spaces between them?

For example, in https://gojs.net/latest/samples/dynamicPorts.html we can create variable number of ports, how come I could set the ports to take the whole available space between them and align them nicely on the edge of a node?

So instead of this:
image
You would end up with this:
Untitled

I would like to be able to do this purely with templates, but haven’t found a way yet…

Thanks,
Ovidijus

In that Dynamic Ports sample there are four Panels holding ports – one for each side.

Two are “Vertical” Panels. Change them to be “Table” Panels and have them stretch: go.GraphObject.Vertical.

Two are “Horizontal” Panels. Change them to be “Table” Panels and have them stretch: go.GraphObject.Horizontal.

That did the trick. Thanks