Fix Issue 244: Merge in Peter's fix to prevent perfectly horizontal/vertical lines from being messed up when resized

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@724 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Jeff Schiller
2009-09-29 03:10:29 +00:00
parent 8d5b970a61
commit d701c8e4c0

View File

@@ -1788,16 +1788,17 @@ function BatchCommand(text) {
var ts = null;
var tx = 0, ty = 0;
var sy = (height+dy)/height, sx = (width+dx)/width;
var sy = height ? (height+dy)/height : 1,
sx = width ? (width+dx)/width : 1;
// if we are dragging on the north side, then adjust the scale factor and ty
if(current_resize_mode.indexOf("n") != -1) {
sy = (height-dy)/height;
sy = height ? (height-dy)/height : 1;
ty = height;
}
// if we dragging on the east side, then adjust the scale factor and tx
if(current_resize_mode.indexOf("w") != -1) {
sx = (width-dx)/width;
sx = width ? (width-dx)/width : 1;
tx = width;
}