diff --git a/src/svgcanvas/event.js b/src/svgcanvas/event.js index 9f76d650..c1655828 100644 --- a/src/svgcanvas/event.js +++ b/src/svgcanvas/event.js @@ -571,6 +571,7 @@ export const mouseUpEvent = (evt) => { const x = mouseX / zoom const y = mouseY / zoom + console.log(svgCanvas.getId()) let element = getElement(svgCanvas.getId()) let keep = false diff --git a/src/svgcanvas/recalculate.js b/src/svgcanvas/recalculate.js index e218e920..c3881db7 100644 --- a/src/svgcanvas/recalculate.js +++ b/src/svgcanvas/recalculate.js @@ -112,12 +112,9 @@ export const recalculateDimensions = (selected) => { } // switch on element type to get initial values if (attrs.length) { - Array.prototype.forEach.call(attrs, (attr) => { - changes[attr] = selected.getAttribute(attr) + attrs.forEach((attr) => { + changes[attr] = convertToNum(attr, selected.getAttribute(attr)) }) - for (const [attr, val] of Object.entries(changes)) { - changes[attr] = convertToNum(attr, val) - } } else if (gsvg) { // GSVG exception changes = { @@ -168,7 +165,9 @@ export const recalculateDimensions = (selected) => { } } } + const N = tlist.numberOfItems + console.log(N) let tx = 0; let ty = 0; let operation = 0 let firstM