summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2015-09-19 16:23:00 +0200
committerPatrick Simianer <p@simianer.de>2015-09-19 16:23:00 +0200
commit95051bfcbfc9a969b08b537a6eea66fd98ab9e07 (patch)
tree158a5b213f14918ddb5144e4b3616228cb690e6d
parent94dcd3d40d3a9da058af90e9068523be2120b3d3 (diff)
highlight new conn
-rw-r--r--edit.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/edit.js b/edit.js
index 85fc434..6c5acc4 100644
--- a/edit.js
+++ b/edit.js
@@ -35,6 +35,7 @@ var r,
// connecting
connect_mode = false,
connect_mode_shape = null,
+ new_conns = [],
// editing
cur_ed = null,
cur_ed_shape = null,
@@ -86,6 +87,10 @@ var conn_str = function (obj1, obj2)
var make_conn = function(obj1, obj2)
{
connections[conn_str(obj1,obj2)] = r.connection(obj1, obj2);
+ if (connect_mode) {
+ new_conns.push(connections[conn_str(obj1,obj2)]);
+ connections[conn_str(obj1,obj2)].line.attr({"stroke-width":stroke_width_hi});
+ }
},
rm_conn = function(id1, id2)
{
@@ -472,6 +477,10 @@ var make_obj = function(x, text, type)
}
}
this.animate({"stroke-width":stroke_width})
+ for (var i=0; i<new_conns.length; i++) {
+ new_conns[i].line.attr({"stroke-width":stroke_width});
+ }
+ new_conns = [];
});
id++;
if (type == "target")