Use real width of SVGs for translation in editor
This commit is contained in:
parent
ed2d7092ae
commit
4d7a2d7172
@ -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") {
|
||||
|
Loading…
Reference in New Issue
Block a user