diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 12b27088..5f66d1c1 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -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;