Hi,
I have a group of group nodes which a are layered in a grid.
As soon as i expand one of the nodes i want the other group nodes to move a side.
When i close (collapse) the group i need to restore the all group nodes locations to their original location.
If i use the Grid layout, the nodes do move a side, as soon a node is expanded, but they do not restore their original location when i close the group.
Any ideas ?
Have you set Part.layoutConditions at all? If so, you may have disabled the conditions under which the collapsing of the group would invalidate the layout of the container.
For an example of what would normally happen, consider the Visual Tree Grouping sample, GoJS Visual Tree Using Nested Groups. If you don’t set Diagram.isReadOnly to true in the myVisualTree
Diagram, and if you add:
$("SubGraphExpanderButton", { alignment: go.Spot.TopLeft }),
into the group template, you will see that as the user collapses and expands groups the GridLayout will automatically be invalidated and performed again, maintaining a uniform distance between nodes.