diff --git a/js/editor.js b/js/editor.js index dcb50d7..858f185 100644 --- a/js/editor.js +++ b/js/editor.js @@ -13,7 +13,8 @@ window.addEventListener("load", () => { document.body.appendChild(newSvg); deckJSON.deck.forEach((card, index) => { let cardSVG = respSVG.cloneNode(true); - cardSVG.setAttributeNS("http://www.w3.org/2000/svg", "x", index*181 + "pt"); + let width = cardSVG.getAttribute("svg:width"); + cardSVG.setAttribute("svg:x", index * width + "pt"); newSvg.appendChild(cardSVG); for (let prop in card) { if (prop !== "count") {