diff --git a/src/svgcanvas/event.js b/src/svgcanvas/event.js index c1655828..fc26382a 100644 --- a/src/svgcanvas/event.js +++ b/src/svgcanvas/event.js @@ -571,7 +571,6 @@ export const mouseUpEvent = (evt) => { const x = mouseX / zoom const y = mouseY / zoom - console.log(svgCanvas.getId()) let element = getElement(svgCanvas.getId()) let keep = false @@ -1012,6 +1011,13 @@ export const mouseDownEvent = (evt) => { svgCanvas.setStartTransform(mouseTarget.getAttribute('transform')) const tlist = mouseTarget.transform.baseVal + // consolidate transforms using standard SVG but keep the transformation used for the move/scale + if (tlist.numberOfItems > 1) { + const firstTransform = tlist.getItem(0) + tlist.removeItem(0) + tlist.consolidate() + tlist.insertItemBefore(firstTransform, 0) + } switch (svgCanvas.getCurrentMode()) { case 'select': svgCanvas.setStarted(true) diff --git a/src/svgcanvas/recalculate.js b/src/svgcanvas/recalculate.js index 22180bfa..08fef8a0 100644 --- a/src/svgcanvas/recalculate.js +++ b/src/svgcanvas/recalculate.js @@ -270,7 +270,6 @@ export const recalculateDimensions = (selected) => { } const N = tlist.numberOfItems - console.log(N) let tx = 0; let ty = 0; let operation = 0 let firstM