summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-12-07 18:12:52 +0200
committerAlon Levy <alon@pobox.com>2014-12-16 10:59:14 +0200
commit4b38cbc3f7ed1a3e4f9da70a2926f7772da8a7c5 (patch)
tree1a9374ce8ac3a3d8dee32a206f204e6f876f1e89
parentba8a541719e1f44d2cce33bb8850c52657159087 (diff)
removeNode(): rm unsued state param,
swith to find_node__by_id() use
-rw-r--r--src/model/graph.js7
-rw-r--r--src/rz_core.js2
2 files changed, 4 insertions, 5 deletions
diff --git a/src/model/graph.js b/src/model/graph.js
index 6784354b..d620e9a0 100644
--- a/src/model/graph.js
+++ b/src/model/graph.js
@@ -95,9 +95,8 @@ function Graph() {
}
}
- this.removeNode = function(id, state) {
- var i = 0;
- var n = findNode(id, state);
+ this.removeNode = function(id) {
+ var n = find_node__by_id(id);
this._removeNodes([n]);
}
@@ -356,7 +355,7 @@ function Graph() {
links[i].__dst = index2;
}
}
- this.removeNode(index.id,null);
+ this.removeNode(index.id);
}
} else {
index.name = new_name;
diff --git a/src/rz_core.js b/src/rz_core.js
index 7114816c..06a6a619 100644
--- a/src/rz_core.js
+++ b/src/rz_core.js
@@ -722,7 +722,7 @@ function showNodeInfo(d, i) {
});
view.node_info.on_delete(function() {
if (confirm('This node and all its connections will be deleted, are you sure?')) {
- graph.removeNode(d.id, null);
+ graph.removeNode(d.id);
update_view__graph(false);
view.node_info.hide();
}