| Visio-imported shapes store their geometry inline as shape=stencil(...). They render fine in the editor, but in view mode each one becomes a plain filled rectangle, with no console error. The reason is that pako isn't available as a global on the view page. draw.io's createShape only decodes inline stencils when typeof(pako) !== "undefined", and otherwise falls back to a plain rectangle silently. My workaround — a JSX that loads pako with define temporarily nulled, so it exports to window:
var oldDefine = window.define;
window.define = undefined;
window.define = oldDefine;
After that the shapes render correctly. A proper fix would be to load pako on the view sheet via RequireJS, set window.pako, and render only after it resolves. |