From 9915407382ecaa4e73b3535c3ed5abf776b6da72 Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Fri, 12 Feb 2010 03:14:38 +0000 Subject: [PATCH] Fix part of Issue 471: path deformation when x,y happened to be zero git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1379 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 002a8f29..4cbb01d3 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1775,8 +1775,8 @@ function BatchCommand(text) { // if absolute or first segment, we want to remap x, y, x1, y1, x2, y2 // if relative, we want to scalew, scaleh if (type % 2 == 0) { // absolute - var thisx = seg.x ? seg.x : currentpt.x, // for V commands - thisy = seg.y ? seg.y : currentpt.y, // for H commands + var thisx = (seg.x != undefined) ? seg.x : currentpt.x, // for V commands + thisy = (seg.y != undefined) ? seg.y : currentpt.y, // for H commands pt = remap(thisx,thisy), pt1 = remap(seg.x1,seg.y1), pt2 = remap(seg.x2,seg.y2); @@ -2749,7 +2749,6 @@ function BatchCommand(text) { if ($.inArray(mouse_target.namespaceURI, [mathns, htmlns]) != -1 && mouse_target.id != "svgcanvas") { - console.log(mouse_target.id); while (mouse_target.nodeName != "foreignObject") { mouse_target = mouse_target.parentNode; }