Hi,
We have a group node in a diagram. Now when dragging/dropping nodes into the group, the group’s area changes, and we have trouble finding the new area size and cannot test it.
We want to keep it the node area same for testing purpose.
How can I do that?
Thanks.
In addition, is it possible to keep the location when reopen a diagram?
We save the locations of all the nodes and use it when rebuild the diagram, but the goJS always shift the entire diagram a bit after reopen and is different from the original location.
Thanks.
You need to set the Diagram.position after the model has been loaded.
You can save the information in the Model.modelData object.
Read Introduction to Models
Example: Draggable Link sample
What version of GoJS are you using? It sounds like you are using an old version that does not support adding DiagramEvent listeners via GraphObject.make.
Thanks, Walter.
BTW, in your reply, you give a link to “intro to models”. I clicked it, it goes to the forum. Could you give me the right link? Thanks.