summaryrefslogtreecommitdiff
path: root/src/client/rz_core.js
diff options
context:
space:
mode:
authorAlon Levy <alon@pobox.com>2014-12-23 14:39:25 +0200
committerAlon Levy <alon@pobox.com>2014-12-23 14:40:26 +0200
commit7f309f2207ce03a3079700176ebcd30161fe10ac (patch)
tree6a6e3b0174eab57857845804176228850299485c /src/client/rz_core.js
parent1312392667fd700fb423cd1c42238a2eccaa3d0a (diff)
client: removal of links through server; Fixes #228
Code is ugly on too many counts, but mainly: 1. repeats local change twice, once for temp and once for non-temp that goes through server. 2. handles topo_diff reply expecting a single id instead of having a general topo_diff reply handler that will take care of it, possibly hanging a callback on it for graph update.
Diffstat (limited to 'src/client/rz_core.js')
-rw-r--r--src/client/rz_core.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/rz_core.js b/src/client/rz_core.js
index 7006af36..0ab227d8 100644
--- a/src/client/rz_core.js
+++ b/src/client/rz_core.js
@@ -380,9 +380,12 @@ function update_view__graph(no_relayout) {
dst = this.link.__dst;
view.edge_info.on_delete(function () {
- graph.removeLink(that.link);
- update_view__graph(true);
view.edge_info.hide();
+ graph.removeLink(that.link, function() {
+ update_view__graph(true);
+ }, function() {
+ console.log("error: could not remove link");
+ });
});
view.edge_info.show(d);
selection.update([src, dst]);