diff options
| -rw-r--r-- | src/model/graph.js | 7 | ||||
| -rw-r--r-- | src/rz_core.js | 2 |
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(); } |
