Collapsed group goes to the bottom of the canvas

Hi, I am using “isSubGraphExpanded” to remember the status of the group. It works fine for me, but the issue is every time I refresh the page the collapsed group goes to the bottom right of the page. Is there any way that it keeps its original place.

See the image below. The two collapsed groups at the bottom right was at the centre of the page. When I collapsed it and refreshed the page. It goes to bottom right.

Are you saving and loading JSON? Do you have locations saved?

Yes I am saving the JSON to the database. And when a user want to pre populate the JSON, we bring the JSON from database and show them on canvas.

There are a number of things that could be going on. Here’s a sample that I believe does what you would expect:

It’s based on the Regrouping sample, which I believe you’ve seen. Notice that it doesn’t set any layouts and it has two-way bindings on location and isSubGraphExpanded. Maybe you’ll be able to figure out what you are doing differently that could be causing the problem. It may be related to layouts.