summaryrefslogtreecommitdiff
path: root/src/client/rz_core.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-12-22 20:23:32 +0200
committerAlon Levy <alon@pobox.com>2014-12-22 20:24:15 +0200
commit3dbebde0ad179390bd17b902c618f2d6a12cdf46 (patch)
tree291bf1edbf9b93b07705a178c526906002fbdcf2 /src/client/rz_core.js
parent89be53c7ebc6d05b3c7bd0ad2ef435b0630a5ca4 (diff)
client: handle link changes via attribute diffs (adds graph.update_link copied from update_node)
Adds a copied TODO for handling id changes (i.e. same problem on nodes) plus a new TODO for a fake API (relevant to both nodes and links)
Diffstat (limited to 'src/client/rz_core.js')
-rw-r--r--src/client/rz_core.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/rz_core.js b/src/client/rz_core.js
index 2361b45f..7006af36 100644
--- a/src/client/rz_core.js
+++ b/src/client/rz_core.js
@@ -76,7 +76,9 @@ var svgInput = (function() {
d = jelement.data().d;
if (e.which == 13 && newname != d.name) {
if (d.hasOwnProperty('__src')) {
- graph.editLink(d.__src.id, d.__dst.id, newname);
+ graph.update_link(d, {name: newname}, function() {
+ update_view__graph(true);
+ });
} else {
graph.update_node(d, {name: newname}, function() {
rz_bus.names.push([newname]);