Fix SVG export

This commit is contained in:
arne 2024-07-20 23:09:25 +02:00
commit f838bbf233

View file

@ -183,7 +183,7 @@ $compile(
["h2", {}, "Export"], ["h2", {}, "Export"],
["div", {}, ["a", { ["div", {}, ["a", {
class: "button", class: "button",
href: svg.map(svg => `data:text/svg,${encodeURI(svg)}`), href: svg.map(svg => `data:text/svg,${encodeURIComponent(svg)}`),
download: sync({ src: { xSeeds, ySeeds } }).map(({ xSeeds, ySeeds }) => `hitomezashi-pattern-${Date.now()}-${xSeeds.join('')}-${ySeeds.join('')}.svg`) download: sync({ src: { xSeeds, ySeeds } }).map(({ xSeeds, ySeeds }) => `hitomezashi-pattern-${Date.now()}-${xSeeds.join('')}-${ySeeds.join('')}.svg`)
}, "Download SVG"]]]] }, "Download SVG"]]]]
).mount(document.body) ).mount(document.body)