I realized a custom viewer to display diagrams realized with diagrams.net editor. More or less my code is:
<script src="http://localhost:8080/my-viewer/mxgraph/js/app.min.js type="text/javascript"></script>
<script src="http://localhost:8080/my-viewer/mxgraph/js/shapes.min.js type="text/javascript"></script>
<script src="http://localhost:8080/my-viewer/mxgraph/js/stencils.min.js type="text/javascript"></script>
<script src="http://localhost:8080/my-viewer/mxgraph/js/extensions.min.js type="text/javascript"></script>
var graph = new mxGraph(container)
diagram = mxUtils.parseXml(xmlDiagram);
codec = new mxCodec(diagram);
codec.decode(diagram.documentElement, graph.getModel());
graph.fit();
It works quite well but I noticed that some shapes are rendered as rectangles instead of circles,triangles and ellipses, like in the following picture where on the right I highlighted in red the wrong shapes:
I suppose I am missing to include something concerning styles or shapes (JS module, xml file, ...) from draw.io webapp but I can't figure out which one. Can anyone give me some hint? Thanks in advance, Marco