I want to add a listener for
mxGraphModel
JavaScript events. How do I expose the model, so that I can register?
In the mxGraphModel documentation [1], I can see the following, but I'm not sure what to call "getModel()" on for
diagrams.net.
codevar enc = new mxCodec();
var node = enc.encode(graph.getModel());
model.addListener(mxEvent.CHANGE, function(sender, evt)...});
[1] mxGraphModel listener documentation
https://jgraph.github.io/mxgraph/docs/js-api/files/model/mxGraphModel-js.html