Integerize the angle when dragging rotation
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@482 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -1684,7 +1684,7 @@ 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(((Math.atan2(cy-y,cx-x) * (180/Math.PI))-90) % 360);
|
||||
canvas.setRotationAngle(parseInt(((Math.atan2(cy-y,cx-x) * (180/Math.PI))-90) % 360));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user