summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorOwen <despito@MacBook-Pro-de-Despito.local>2014-08-06 16:37:06 +0300
committerOwen <despito@MacBook-Pro-de-Despito.local>2014-08-06 16:37:06 +0300
commit82f350da416cbbab32c1022dd7bfea9c9e10ba82 (patch)
tree23452fb4c7615f100615055729d839966cbf9257 /scripts
parentd81197849358f2482dbb46113f87beedee02f072 (diff)
Highlight selection/deselection
Nodes can be deselected by clicking background Clicking in the new sentence bubble will deselect the previous nodes
Diffstat (limited to 'scripts')
-rw-r--r--scripts/rhizicore.js13
-rw-r--r--scripts/textanalysis.js12
2 files changed, 18 insertions, 7 deletions
diff --git a/scripts/rhizicore.js b/scripts/rhizicore.js
index 31d30041..60a6a765 100644
--- a/scripts/rhizicore.js
+++ b/scripts/rhizicore.js
@@ -374,8 +374,10 @@ function myGraph(el) {
vis.append("rect")
.attr("class", "overlay graph")
- .attr("width", w * 5)
- .attr("height", h);
+ .attr("width", $(el).innerWidth()*12)
+ .attr("height", $(el).innerHeight()*12)
+ .attr("x", -$(el).innerWidth()*5)
+ .attr("y", -$(el).innerHeight()*5);
$('.overlay').click(mousedown);
link.enter().append("svg:defs").selectAll("marker")
@@ -497,6 +499,9 @@ function myGraph(el) {
})
.on("click", function(d, i) {
if(d.state!=="temp")showInfo(d, i);
+ else graph.removeHighlight();
+
+ graph.update();
});
//if(graphstate==="GANTT"){
@@ -732,8 +737,10 @@ function tick(e) {
function deliverableTest() {
+ links=[];
+ nodes=[];
var status = "unknown";
- var nodecounter = 80;
+ var nodecounter = 150;
for (var i = 0; i < nodecounter; i++) {
if (Math.random() > 0.7) status = "done";
else if (Math.random() > 0.5) status = "current";
diff --git a/scripts/textanalysis.js b/scripts/textanalysis.js
index 3b97ee71..cde4c937 100644
--- a/scripts/textanalysis.js
+++ b/scripts/textanalysis.js
@@ -29,9 +29,16 @@ $("#textanalyser").keypress(function(e) {
}else{
suggestionChange=false;
}
-
+
return false;
}
+
+
+ if (e.which == 9) {//TAB
+ text = $('#textanalyser').val();
+ $('#textanalyser').val(text+" ");
+ return false;
+ }
});
$(document).keydown(function(e) {
@@ -51,11 +58,8 @@ $(document).keydown(function(e) {
if (e.keyCode == 40) {//DOWN
suggestionChange=true;
}
-
if (e.keyCode == 9) {//TAB
- text = $('#textanalyser').val();
- $('#textanalyser').val(text+" ");
return false;
}