sandstorm/MxGraph

Cliparts are not visible in the frontend

jonnitto opened this issue · 1 comments

If cliparts are used in a diagramm, there are visible in the backend, but not in the frontend.

image

If I create an image with the src of the svg, the cliparts will not show up, but if I include directly the SVG, everything looks fine:
image

Currently, I solved this with this Javascript:

[...document.querySelectorAll('.sandstorm-mxgraph-diagram img')].forEach(
    (image) => {
        fetch(image.src)
            .then((response) => response.text())
            .then((svg) => {
                image.parentNode.innerHTML = svg;
            })
            .catch(console.error.bind(console));
    }
);