From 13003a3de22cb8c4f23466db31ac0740786ecf68 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Fri, 12 Feb 2010 14:23:55 +0000 Subject: [PATCH] Fixed issue 446 git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1381 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index a8c4c7df..556ec8da 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -4695,11 +4695,18 @@ function BatchCommand(text) { } // else, create a new point, append to pts array, update path element else { + // Checks if current target or parents are #svgcontent + if(!$.contains(container, evt.target)) { + // Clicked outside canvas, so don't make point + return false; + } + var lastx = current_path_pts[len-2], lasty = current_path_pts[len-1]; // we store absolute values in our path points array for easy checking above current_path_pts.push(x); current_path_pts.push(y); d_attr += "L" + round(x) + "," + round(y) + " "; + path.setAttribute("d", d_attr); // set stretchy line to latest point