The SVG is now given a black rectangle as a background, and its top level element now has the proper xmlns attribute. Double-clicking the SVG renderer downloads the SVG as a file called "matrix.svg".

This commit is contained in:
Rezmason
2025-05-13 18:20:51 -07:00
parent 4bf94d7883
commit 3fef805c1f
3 changed files with 20 additions and 15 deletions

View File

@@ -194,7 +194,12 @@ export default ({ artboard, config }) => {
glyphElements.sort((p, q) => q[0] - p[0])
output.innerHTML = `<style>path { mix-blend-mode: screen; }</style>${defs.outerHTML}${glyphElements.map(([depth, tag]) => tag).join("\n")}`;
output.innerHTML = [
`<style>path { mix-blend-mode: screen; }</style>`,
defs.outerHTML,
`<rect width="100%" height="100%" />`,
glyphElements.map(([depth, tag]) => tag).join("\n")
].join("\n");
artboard.appendChild(output);
};