diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/gant.js | 4 | ||||
| -rw-r--r-- | scripts/rhizicore.js | 4 | ||||
| -rw-r--r-- | scripts/textanalysis.js | 12 |
3 files changed, 15 insertions, 5 deletions
diff --git a/scripts/gant.js b/scripts/gant.js index cabca200..ae849dd6 100644 --- a/scripts/gant.js +++ b/scripts/gant.js @@ -10,7 +10,7 @@ function checkSwitch(checkswitch) { $('body').scrollLeft(0); graphstate = "GRAPH"; - graph.updateGraph(); + graph.update(); $('.status').fadeOut(600); @@ -27,7 +27,7 @@ function checkSwitch(checkswitch) { graphstate = "GANTT"; - graph.updateGraph(); + graph.update(); $('.status').fadeIn(600); diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js index 481a8ed7..6937201c 100644 --- a/scripts/rhizicore.js +++ b/scripts/rhizicore.js @@ -347,13 +347,15 @@ function myGraph(el) { } function dragged(d) { + + d3.select(this).classed("fixed", true); d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y); } function dragended(d) { d3.select(this).classed("dragging", false); d3.select(this).classed("fixed", true); - d3.select(this).attr("dx", d3.event.x).attr("dy", d3.event.y); + //d3.select(this).attr("cx", d.x = d3.event.x).attr("cy", d.y = d3.event.y); } var force = d3.layout.force() diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js index cde4c937..77c158be 100644 --- a/scripts/textanalysis.js +++ b/scripts/textanalysis.js @@ -225,6 +225,9 @@ function TextAnalyser2(newtext, finalize) { //0-N ORDER STACK for (var m = 0; m < orderStack.length - 1; m++) { switch (orderStack[m]) { + case "START": + if(!typeStack[nodeindex])typeStack[nodeindex]=nodetypes[typeindex]; + break; case "NODE": graph.addNode(newnodes[nodeindex], typeStack[nodeindex], typesetter); if (!abnormalGraph) graph.addLink(newnodes[nodeindex - 1], newnodes[nodeindex], newlinks[linkindex], typesetter); @@ -254,7 +257,7 @@ function TextAnalyser2(newtext, finalize) { case "LINK": linkindex++; graph.addNode("new node", "empty", "temp"); - if (!abnormalGraph) graph.addLink(newnodes[nodeindex - 1], "new node", newlinks[linkindex], "temp"); + if (!abnormalGraph)graph.addLink(newnodes[nodeindex - 1], "new node", newlinks[linkindex], "temp"); ANDcase = ANDconnect("new node"); break; } @@ -265,12 +268,17 @@ function TextAnalyser2(newtext, finalize) { if (newnodes[nodeindex - 2]) if (newlinks[linkindex - 1].replace(/ /g, "") == "and" && newlinks[linkindex].replace(/ /g, "") !== "and") { if (!abnormalGraph) - if(finalize)graph.addLink(newnodes[nodeindex - 2], node, newlinks[linkindex], typesetter); + //if(finalize)graph.addLink(newnodes[nodeindex - 2], node, newlinks[linkindex], typesetter); + if(finalize)graph.editLink(newnodes[nodeindex - 2], newnodes[nodeindex - 1], completeSentence); else graph.addLink(newnodes[nodeindex - 2], node, newlinks[linkindex], "temp"); return true; } } + console.log(sentence); + console.log(completeSentence); + console.log(orderStack); + //STAR CASE var verb = ""; if (abnormalGraph) { |
