A group, when collapsed, does not restore its original location

Hi,
When I load a a diagram from JSON, and expand one of its group, the group does not restore its original location before it was expanded.
See attached pic BEFORE expanding :


Then, i expand the upper group :

And collapse it , it moves to a different place :

I would like to ephasize that it happens only when the group is expanded for the first time.
When i expand and collapsed the same group for the second and third…times, the group restores its location.
I tried setting the scrollMode to infinite. Didn’t help.
I must find a way to solve it…frustration…
Thanks
Tany

Does the Group have a Placeholder?

Before the group is expanded the first time, do all of its member nodes have the same locations that you want them to have after expanding?

yes,
yes, all group & nodes are binded to “loc”.
Should i save the “loc” of the group in subGraphHandler and restore “loc” in collapseHandler ?

My question was whether all of the member nodes had the desired locations before expansion that you wanted them to have after expansion.

Yes they did have the desire location.
If you look at the expanded group, its member nodes are arranged nicely in a specific location.
By the way should i bind position or location to “loc” ?

Oh, yes, you have a Group.layout that is being performed on each expansion. You can avoid that by setting either Layout.isOngoing to false or setting .Part.layoutConditions on the Nodes snd Links to remove the flags for becoming visible.

You can bind either GraphObject.position or Part.location. Your choice, depending on what point on each node you want to be the given Point.

No, i don’t have group layout.
In the other thread i said that the group layout is used only once, letting the user arrange the nodes the way he likes.
I managed to overcome it by saving the node.poistion in subGraphExpnaderHandler and restore it in subGraphCollapsehandler.
For now…

I’m not sure that’s wise. What happens when the user moves a collapsed group and then expands it?

If all of the member nodes have their correct positions or locations before expanding, and if there is no Group.layout, then I do not understand what is causing those member nodes to move.

Neither do i.
I know that it is NOT the best solution, but it is good enough to put down the flames.