Perhaps this question may seem trivial, but I am facing an issue in my code and seeking guidance from the community.
I am working on a javascript mxGraph application within Angular7. Specifically, I have modified the ports.html example for my project.
When I add two nodes and connect them, I use the following code to export it as XML:
var enc = new mx.mxCodec(mx.mxUtils.createXmlDocument());
var node = enc.encode(editor.graph.getModel());
xml = mx.mxUtils.getPrettyXml(node);
After saving and reloading, everything works fine.
However, when I try to move the connection like shown in this image:
https://i.sstatic.net/6kNum.png
The connection does not get redrawn on the graph, even though it is present in the model as a cell:
https://i.sstatic.net/edzzH.png
Here's a screenshot of the model where you can see that both connections are present but only one is actually drawn: