summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/model/graph.js20
-rw-r--r--src/client/rz_core.js9
2 files changed, 10 insertions, 19 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;
}
/**
diff --git a/src/client/rz_core.js b/src/client/rz_core.js
index 7ec19692..2361b45f 100644
--- a/src/client/rz_core.js
+++ b/src/client/rz_core.js
@@ -78,10 +78,13 @@ var svgInput = (function() {
if (d.hasOwnProperty('__src')) {
graph.editLink(d.__src.id, d.__dst.id, newname);
} else {
- graph.editName(d.id, newname);
+ graph.update_node(d, {name: newname}, function() {
+ rz_bus.names.push([newname]);
+ update_view__graph(true);
+ });
+ // TODO - 'updating' graphic
+ // TODO - use promises to make A follows B readable.
}
- rz_bus.names.push([newname]);
- update_view__graph(true);
}
hide();
}