diff options
| author | Alon Levy <alon@pobox.com> | 2014-11-10 16:30:38 +0200 |
|---|---|---|
| committer | Alon Levy <alon@pobox.com> | 2014-11-10 16:31:30 +0200 |
| commit | 7b4fb125b77d4b8671ea2908e98fd3d844944c9b (patch) | |
| tree | 3f877942f84776994f7766de027b2ccad2a890ac /scripts/textanalysis.js | |
| parent | ba6e95f3d76b84571ef2cf016b26fc98b2d75c43 (diff) | |
graph/textanalysis.ui: lastnode is now the last added node (fixes #124)
Diffstat (limited to 'scripts/textanalysis.js')
| -rw-r--r-- | scripts/textanalysis.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js index e911adf6..4394a93f 100644 --- a/scripts/textanalysis.js +++ b/scripts/textanalysis.js @@ -362,9 +362,6 @@ var textAnalyser = function (newtext, finalize) { ret.drop_conjugator_links = and_count < linkindex; - //FOR THE EXTERNAL ARROW-TYPE CHANGER - lastnode = newnodes[nodeindex]; - ret.applyToGraph = function(graph, backend_commit) { window.ret = ret; var comp = graph.compareSubset('temp', @@ -398,7 +395,7 @@ var textAnalyser = function (newtext, finalize) { if (n.state == 'temp' && finalize) { console.log('bug: temp node creation on finalize'); } else { - graph.addNode(n.name, n.type, n.state); + lastnode = graph.addNode(n.name, n.type, n.state); } } for (k in ret.links) { @@ -436,7 +433,10 @@ return { autoSuggestAddName:autoSuggestAddName, ANALYSIS_NODE_START:ANALYSIS_NODE_START, ANALYSIS_LINK:ANALYSIS_LINK, + + //for the external arrow-type changer lastnode: function() { return lastnode; }, + typeindex: function() { return typeindex; }, typeindex_next: function() { typeindex = (typeindex + 1) % 5; |
