diff --git a/modules/export.js b/modules/export.js index b8f74785..469fafa4 100644 --- a/modules/export.js +++ b/modules/export.js @@ -184,6 +184,9 @@ async function getMapURL(type, options = {}) { filters[i].remove(); } + const hatching = svgDefs.getElementById("defs-hatching"); + if (hatching) cloneDefs.appendChild(hatching.cloneNode(true)); + // remove unused patterns const patterns = cloneEl.querySelectorAll("pattern"); for (let i = 0; i < patterns.length; i++) { @@ -262,9 +265,6 @@ async function getMapURL(type, options = {}) { if (pattern) cloneDefs.appendChild(pattern.cloneNode(true)); } - const hatching = svgDefs.getElementById("defs-hatching"); - if (hatching) cloneDefs.appendChild(hatching.cloneNode(true)); - if (!cloneEl.getElementById("fogging-cont")) cloneEl.getElementById("fog")?.remove(); // remove unused fog if (!cloneEl.getElementById("regions")) cloneEl.getElementById("statePaths")?.remove(); // removed unused statePaths if (!cloneEl.getElementById("labels")) cloneEl.getElementById("textPaths")?.remove(); // removed unused textPaths