From 507617badacf14ed248c96230f1c8760a28c61b0 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Sat, 19 Sep 2015 12:53:31 +0200 Subject: fix --- edit.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/edit.js b/edit.js index 0d87e78..af1611d 100644 --- a/edit.js +++ b/edit.js @@ -220,8 +220,11 @@ up = function () { } target_shapes.splice(i, 1); delete shapes_by_id[this["id_"]]; - del.pair.remove(); - del.remove(); + var x = del.pair; + if (x) + x.remove(); + if (del) + del.remove(); snap_to_grid(true); return; @@ -427,7 +430,7 @@ add_obj = function() make_obj(xbegin+padding, "X", "target", 0); } else { make_obj(shapes[max_idx].getBBox().x2+(margin-padding), - "NEW", + "X", "target", max+1); } -- cgit v1.2.3