Changing location of Groups

I’d like to add an observation which might not be related, but we are having problems with that as well. The location of a group seems to change if you expand/collapse it (but not visullally, just the underlying data). This causes a problem because we have a two-way binding on the location so if you expand/collapse it looks fine, but if you save the data and load it again, the group has moved because of the change in the location

In your example if you change the text binding to

new go.TextBlock().bind(new go.Binding("text", "location").ofObject()),

Then on first load the Y part is 0 for all

If you expand and collapse the group, the nodes still have Y as 0 and the group looks visually set to be the same Y but the location data is actually set to 55.xxx - so if you save this location and load it again the group has moved

That’s interesting. I think it has to do with how the bounds or location of a Group with a Placeholder is determined, which seems to differ based on whether the Placeholder has ever been visible or not. I’ll have to look into it, but I’m hesitant about making a change in v3.* in case it causes any unfortunate incompatibilities.

Thank you for looking into it. I would be happy with a workaround e.g. making the placeholder visible from the beginning or something.