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
master
Jeff Schiller 2009-12-03 21:50:46 +00:00
parent 3cebabc86a
commit 61d03c8cbf
1 changed files with 5 additions and 1 deletions

View File

@ -1512,6 +1512,7 @@ function BatchCommand(text) {
// if the new center of the shape has moved, then // if the new center of the shape has moved, then
// re-center the rotation, and determine the movement // re-center the rotation, and determine the movement
// offset required to keep the shape in the same place // offset required to keep the shape in the same place
rotAngle = xform.angle;
if (origcenter.x != newcenter.x || origcenter.y != newcenter.y) { if (origcenter.x != newcenter.x || origcenter.y != newcenter.y) {
rotAngle = xform.angle; rotAngle = xform.angle;
var alpha = xform.angle * Math.PI / 180.0; var alpha = xform.angle * Math.PI / 180.0;
@ -1533,6 +1534,9 @@ function BatchCommand(text) {
scalew = function(w) { return w; } scalew = function(w) { return w; }
scaleh = function(h) { return h; } scaleh = function(h) { return h; }
} }
else {
tlist.removeItem(n);
}
break; break;
default: default:
continue; continue;
@ -1641,7 +1645,7 @@ function BatchCommand(text) {
// we may need to insert a rotation back now // we may need to insert a rotation back now
if (rotAngle != 0) { if (rotAngle != 0) {
var newrot = svgroot.createSVGTransform(); var newrot = svgroot.createSVGTransform();
newrot.setRotate(xform.angle, newcenter.x, newcenter.y); newrot.setRotate(rotAngle, newcenter.x, newcenter.y);
tlist.insertItemBefore(newrot, 0); tlist.insertItemBefore(newrot, 0);
} }
} // a non-group } // a non-group