From 97072bb24916a535f02d376b8755b62fb5e9a33b Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Mon, 21 Dec 2009 13:55:20 +0000 Subject: [PATCH] Fixed Issue 367: Cannot resize a circle with the mouse git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1075 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 487e6e4e..0eaac8a4 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1364,7 +1364,9 @@ function BatchCommand(text) { changes["cx"] = c.x; changes["cy"] = c.y; // take the minimum of the new selected box's dimensions for the new circle radius - changes["r"] = Math.min(box.width/2,box.height/2); + var tbox = transformBox(box.x, box.y, box.width, box.height, m); + var w = tbox.tr.x - tbox.tl.x, h = tbox.bl.y - tbox.tl.y; + changes["r"] = Math.min(w/2, h/2); break; case "ellipse": var c = remap(changes["cx"],changes["cy"]);