From 3dbebde0ad179390bd17b902c618f2d6a12cdf46 Mon Sep 17 00:00:00 2001 From: Alon Levy Date: Mon, 22 Dec 2014 20:23:32 +0200 Subject: 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) --- src/client/rz_core.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/client/rz_core.js') 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]); -- cgit v1.3.1