diff options
| author | Alon Levy <alon@pobox.com> | 2014-10-06 15:20:37 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-10-07 08:51:35 +0300 |
| commit | f7c32bf55b857042a665263b02f0b3213ecbef3a (patch) | |
| tree | 26358fbb6cac1445f442d7339faecd1dc0337529 /scripts | |
| parent | 3ac3aa40b393697b3b5c9fccd54ad444781eaf73 (diff) | |
rhizicore: don't change state of existing nodes on addition
changing state of existing node results in ability to delete nodes while
creating a new sentence by inputting a node name and then deleting it.
This was fixed for the common case in a previous commit, but not for the
case of loading from storage.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/rhizicore.js | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 91b2c634..26059cc6 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -70,9 +70,7 @@ function myGraph(el) { // No history recorded - this is a helper for loading from files / constant graphs id = id.toLowerCase(); var node = findNode(id, null); - if (node !== undefined) { - graph.editState(id, null, "temp"); - } else { + if (node === undefined) { nodes.push(makeNewNode({ "id": id, "name": name, |
