From 3a650df9431e5dee75f48b8ac42466390202f217 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Mon, 21 Sep 2009 20:23:42 +0000 Subject: [PATCH] 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 --- editor/svgcanvas.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 5bb5fdf7..2124299d 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -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)