Node Link length inconsistent for different nodes

Hi, our gojs diagram nodes are not producing Links to their child with consistent lengths:

Examples:

Code being used for Expander/Collapser button (with a vertical line like shape):


Note: Here assigned_departments are being represented by dots at the bottom of the node (like in asdfgik or other name 7373 nodes in the above picture).

Link creation code:

Are you using TreeLayout? It appears that those dots are making the node taller. If layers are aligned on some sort of grid, that might increase the distance between the layers. It would be useful to confirm that this is the case by having a node under the bottom “Position” on the left side branch.

And how are your node and the “PositionsTreeExpander” defined?

Yes, we are using TreeLayout and yes the dots make nodes taller.

Here’s the PositionsTreeExpander code:


here you go, your assumption seems right. How do I fix this?:

And what is your TreeLayout configuration?

Maybe instead of binding the “visible” property of those dots, you can bind their “opacity” property. Have the conversion function return 1.0 to make it seen and 0.0 to make it unseen.

Hi, I’m not using visibility property binding for dots, I’m using item template maps for them, as suggested by you in https://forum.nwoods.com/t/rounded-rectangle-parameter1-not-working-without-an-invisible-dummy-shape/10049

Ah, OK. Then specify a minSize on that Panel so that its height does not change between when there are no items in it and when there are.

Hi, I tried minSize, it does cause some changes (like we don’t need a previously specified top padding for position name with no dots) but it doesn’t effect Link Length:

So, everything looks good except for the vertical position of the collapsing button, yes? Why is that affected by the presence of the other objects?

I wonder if your node template has gotten too complicated for me to understand, so it would be better to use two separate templates: one simple one and one with all those details. GoJS Template Maps -- Northwoods Software

Hi, seems there were problems with some binding functions which were changing objects within them, removing those bindings and giving the dots/badges Panel a Fixed height of 16px solves the problem.