Fixed bug caused by moving a horizontal/vertical line

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@668 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-09-21 20:23:42 +00:00
parent 1479bf7de4
commit 3a650df943
1 changed files with 3 additions and 0 deletions

View File

@ -954,6 +954,9 @@ function BatchCommand(text) {
// after this point, we have some change to this element
var remap = function(x,y) {
// Prevent division by 0
if(!box.height) box.height = 1;
if(!box.width) box.width = 1;
return {
'x':(((x-box.x)/box.width)*selectedBBox.width + selectedBBox.x),
'y':(((y-box.y)/box.height)*selectedBBox.height + selectedBBox.y)