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
master
Alexis Deveria 2009-12-21 13:55:20 +00:00
parent 8f5f540b23
commit 97072bb249
1 changed files with 3 additions and 1 deletions

View File

@ -1364,7 +1364,9 @@ function BatchCommand(text) {
changes["cx"] = c.x; changes["cx"] = c.x;
changes["cy"] = c.y; changes["cy"] = c.y;
// take the minimum of the new selected box's dimensions for the new circle radius // 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; break;
case "ellipse": case "ellipse":
var c = remap(changes["cx"],changes["cy"]); var c = remap(changes["cx"],changes["cy"]);