summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-09-19 12:53:31 +0200
committerPatrick Simianer <p@simianer.de>2015-09-19 12:53:31 +0200
commit507617badacf14ed248c96230f1c8760a28c61b0 (patch)
tree62016d2a8d7512f41dabaef7e0e18b572f36edc7
parent7657f0a8e5edb7b8db1a127fe2f70fa378a3a5b6 (diff)
fix
-rw-r--r--edit.js9
1 files 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);
}