summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorLV-426 <lv-426@taproot.org.il>2014-12-16 15:33:21 +0200
committerLV-426 <lv-426@taproot.org.il>2014-12-16 15:40:10 +0200
commit75b24aae426104b4894101bf23171dbd18ff0946 (patch)
treed64f3c7756c34a8205791edc1c0be6ee15b6202e /src/model
parent2797072203d9a2e3b794948ca0754704661ec245 (diff)
graph.editName() cleanup: fix inner variables names
Diffstat (limited to 'src/model')
-rw-r--r--src/model/graph.js24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/model/graph.js b/src/model/graph.js
index 3751ab3d..0116bc31 100644
--- a/src/model/graph.js
+++ b/src/model/graph.js
@@ -391,31 +391,31 @@ function Graph() {
}
this.editName = function(id, new_name) {
- var index2 = findNodeByName(new_name);
- var index = find_node__by_id(id);
+ var n_eq_name = findNodeByName(new_name);
+ var n_eq_id = find_node__by_id(id);
var acceptReplace=true;
- if (index === undefined) {
+ if (n_eq_id === undefined) {
return;
}
- if (index.name == new_name) {
+ if (n_eq_id.name == new_name) {
return;
}
- if (index2 !== undefined && index.state !== 'temp' && !compareNames(index.name, new_name)) {
- acceptReplace = confirm('"' + index2.name + '" will replace "' + index.name + '", are you sure?');
+ 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 === index) {
- links[i].__src = index2;
+ if (links[i].__src === n_eq_id) {
+ links[i].__src = n_eq_name;
}
- if (links[i].__dst === index) {
- links[i].__dst = index2;
+ if (links[i].__dst === n_eq_id) {
+ links[i].__dst = n_eq_name;
}
}
- this.removeNode(index.id);
+ this.removeNode(n_eq_id.id);
}
} else {
- index.name = new_name;
+ n_eq_id.name = new_name;
}
}