Fix Issue 150: Merge antimatter15's patch - thanks
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@508 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
402187cba4
commit
1b3ada5449
|
@ -1710,7 +1710,8 @@ function SvgCanvas(c)
|
|||
break;
|
||||
case "rotate":
|
||||
var box = canvas.getBBox(selected),cx = box.x + box.width/2, cy = box.y + box.height/2;
|
||||
canvas.setRotationAngle(parseInt(((Math.atan2(cy-y,cx-x) * (180/Math.PI))-90) % 360));
|
||||
var angle = parseInt(((Math.atan2(cy-y,cx-x) * (180/Math.PI))-90) % 360);
|
||||
canvas.setRotationAngle(angle<-180?(360+angle):angle);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue