@Tany wrote:
Hi,
If i save nodes to Json and load the Json back to the diagram, the nodes are loaded exactly to the position/location they were located when saved to Json.
When i group the nodes into some groups and save the groups to Json, when loaded, the group location are shifted linearly up and left
See attach pic, before saving to Json :
See attached pic after loading from Json :
- I DO NOT use any auto layout
- I bind “location” in group and node templates.
- i DO NOT set the initialContentAlignment
- I bind the “isSubGraphExpanded” in the group template, makeTwoWay
- When i create the group, I DO NOT set the “loc” value, they are created elsewhere on the diagram and i drag them to a new location and save to Json.
- Before i load from Json, i run diagram.clear();
- I set scrollMode:go.Diagram.InfiniteScroll
I need the diagram nodes/groups to be loaded to the location they were saved.
Please advise.
Tany
Posts: 5
Participants: 2

