diff options
| author | Alon Levy <alon@pobox.com> | 2014-10-07 21:43:32 +0300 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-10-07 21:43:32 +0300 |
| commit | 6f30dfaab7a3b97d87067af5fdc3c2b390b8e2e9 (patch) | |
| tree | c5a3dbd6e6c71d12116392d15c39d1fe50b8b5a2 /scripts/textanalysis.js | |
| parent | fc7ecac8c22e79f669b2e4ff28f32641102ebfd3 (diff) | |
Fixes #49: forgot link changes
Diffstat (limited to 'scripts/textanalysis.js')
| -rw-r--r-- | scripts/textanalysis.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js index 74b029ae..5003b110 100644 --- a/scripts/textanalysis.js +++ b/scripts/textanalysis.js @@ -325,11 +325,16 @@ var textAnalyser2 = function (newtext, finalize) { return [link.sourceId.toLowerCase(), link.targetId.toLowerCase()]; } )); - var k, n; + var k, n, l; if (comp.graph_same && !finalize) { + console.log('same graph, changing graph just a bit'); if (comp.old_id && comp.new_id) { graph.editName(comp.old_id, null, comp.new_id); } + for (k in ret.links) { + l = ret.links[k]; + graph.addLink(l.sourceId, l.targetId, l.name, l.state, ret.drop_conjugator_links); + } } else { //REINITIALISE GRAPH (DUMB BUT IT WORKS) graph.removeNodes("temp"); @@ -339,7 +344,7 @@ var textAnalyser2 = function (newtext, finalize) { graph.addNode(n.id, n.type, n.state); } for (k in ret.links) { - var l = ret.links[k]; + l = ret.links[k]; graph.addLink(l.sourceId, l.targetId, l.name, l.state, ret.drop_conjugator_links); } } |
