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 :
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
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.