From 8bf586c28354a22f08bacd8cc8a58a2e5bce2083 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 7 Feb 2018 07:29:43 +1300 Subject: [PATCH] Fixed issue with adding lines from a joint --- sources/scripts/dotgrid.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sources/scripts/dotgrid.js b/sources/scripts/dotgrid.js index db9c172..7e8dc35 100644 --- a/sources/scripts/dotgrid.js +++ b/sources/scripts/dotgrid.js @@ -251,13 +251,14 @@ function Dotgrid(width,height,grid_x,grid_y,block_x,block_y,thickness = 3,lineca if(pos.x > 0) { dotgrid.translation = null; return; } - if(dotgrid.translation){ + if(dotgrid.translation && Math.abs(dotgrid.translation.from.x) != Math.abs(dotgrid.translation.to.x) && Math.abs(dotgrid.translation.from.y) != Math.abs(dotgrid.translation.to.y)){ dotgrid.tool.translate(dotgrid.translation.from,dotgrid.translation.to); dotgrid.translation = null; return; } this.tool.add_vertex({x:pos.x * -1,y:pos.y}); + dotgrid.translation = null; this.draw(); }