diff options
| author | Alon Levy <alon@pobox.com> | 2014-12-22 13:57:22 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-12-22 13:57:22 +0200 |
| commit | 3f06e9626a01c80e49bcb5898a7a8cd43c2991ff (patch) | |
| tree | a3d2596e5344a1e63b21cb9f4528373c4f2b78a6 /src/client/model/graph.js | |
| parent | 0196f6c212bb1937445848a22880e6cbd9a22a86 (diff) | |
client: use update_node for svg_input node name editing
Diffstat (limited to 'src/client/model/graph.js')
| -rw-r--r-- | src/client/model/graph.js | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/client/model/graph.js b/src/client/model/graph.js index 7e4d9ad7..411c1ba2 100644 --- a/src/client/model/graph.js +++ b/src/client/model/graph.js @@ -447,22 +447,10 @@ function Graph() { if (n_eq_id.name == new_name) { return; } - if (n_eq_name !== undefined && n_eq_id.state !== 'temp' && !compareNames(n_eq_id.name, new_name)) { - acceptReplace = confirm('"' + n_eq_name.name + '" will replace "' + n_eq_id.name + '", are you sure?'); - if (acceptReplace){ - for (var i = 0; i < links.length; i++) { - if (links[i].__src === n_eq_id) { - links[i].__src = n_eq_name; - } - if (links[i].__dst === n_eq_id) { - links[i].__dst = n_eq_name; - } - } - this.removeNode(n_eq_id.id); - } - } else { - n_eq_id.name = new_name; - } + util.assert(n_eq_id.state === 'temp', 'editName should now only be used by textanalysis'); + util.assert(n_eq_name === undefined); + + n_eq_id.name = new_name; } /** |
