From 61d03c8cbfbc312d8d7a6aab306fb7b5cc5ec839 Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Thu, 3 Dec 2009 21:50:46 +0000 Subject: [PATCH] fixtransforms branch: really fix rotations this time (I am not just trying to rack up revision numbers) git-svn-id: http://svg-edit.googlecode.com/svn/branches/fixtransforms@995 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 5a5189b8..dd291c40 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1512,6 +1512,7 @@ function BatchCommand(text) { // if the new center of the shape has moved, then // re-center the rotation, and determine the movement // offset required to keep the shape in the same place + rotAngle = xform.angle; if (origcenter.x != newcenter.x || origcenter.y != newcenter.y) { rotAngle = xform.angle; var alpha = xform.angle * Math.PI / 180.0; @@ -1533,6 +1534,9 @@ function BatchCommand(text) { scalew = function(w) { return w; } scaleh = function(h) { return h; } } + else { + tlist.removeItem(n); + } break; default: continue; @@ -1641,7 +1645,7 @@ function BatchCommand(text) { // we may need to insert a rotation back now if (rotAngle != 0) { var newrot = svgroot.createSVGTransform(); - newrot.setRotate(xform.angle, newcenter.x, newcenter.y); + newrot.setRotate(rotAngle, newcenter.x, newcenter.y); tlist.insertItemBefore(newrot, 0); } } // a non-group