Mxcodec Decode Function Not Working With Xml
I'm developing an application in javascript with Angular7 and MxGraph library. I am able to save the MxGraph model into an XML with this code: var enc = new mx.mxCodec(mx.mxUtils.c
Solution 1:
I apologize for answering my own reply, but I finally found a clue here: Editor doesn't created when mxGraph is used as npm module
Adding these lines to my code solved the issue:
// Workaround because window['mxGraphModel'] is not definedwindow['mxEditor'] = mx.mxEditor;
window['mxGeometry'] = mx.mxGeometry;
window['mxDefaultKeyHandler'] = mx.mxDefaultKeyHandler;
window['mxDefaultPopupMenu'] = mx.mxDefaultPopupMenu;
window['mxGraph'] = mx.mxGraph;
window['mxCell'] = mx.mxCell;
window['mxCellPath'] = mx.mxCellPath;
window['mxGraph'] = mx.mxGraph;
window['mxStylesheet'] = mx.mxStylesheet;
window['mxDefaultToolbar'] = mx.mxDefaultToolbar;
window['mxGraphModel'] = mx.mxGraphModel;
Post a Comment for "Mxcodec Decode Function Not Working With Xml"