Hello Nortwoods staff,
I’m trying to save my diagram model as JSON and I can kind of do it. When I mouse-drag an existing link’s endpoint to another port, I can view the change with model.toJson(). But when I click to a port and create a new link from it (not dragging an existing link) some data is missing in variable that I get with model.toJson (modelAsText).
This is the original text of the model when I first initialize the diagram without any changes.
This is when I drag one link from whichever node it goes and connect it to another node.
As you can see the “to” element of linkDataArray’s first object has changed.
And this is when I click-drag on the same node and create a whole new link and connect it to some other node.
You can see that there is a new object is created in the linkDataArray to define link. But it doesn’t contain “topid” element unlike others despite of the link is created successfully.
Can anyone help?
Thanks.