From 335af0bbf19ef4e6454233c9b4d212ee5aaa9d0d Mon Sep 17 00:00:00 2001 From: Owen Date: Mon, 14 Jul 2014 19:06:42 +0300 Subject: Target and adjacent nodes are highlighted when clicked Background click remove editing boxes and highlights Deliverables test button adds 140 random tasks and dates Links between nodes have two colors: blue and green for dependencies --- scripts/robot.js | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'scripts/robot.js') diff --git a/scripts/robot.js b/scripts/robot.js index f3ccc989..3292b51f 100644 --- a/scripts/robot.js +++ b/scripts/robot.js @@ -1,16 +1,23 @@ -var sentence="#Rhizibot is showing you a #tutorial "; +var sentence=""; +/*sentence+="#Rhizibot is showing you a #tutorial "; sentence+="#Rhizi visualizes data with #Graphs "; sentence+="#Graphs are great to display #relationships "; sentence+="#nodes are #entities "; sentence+="#nodes are #concepts "; sentence+="#entities can be #concepts "; sentence+="#concepts have context with #relationships "; -sentence+="We built this entire graph in 30 seconds, try it out yourself!"; +sentence+="We built this entire graph in 30 seconds, try it out yourself!";*/ sentence=""; var arr=["works on","contibutes to","likes","knows","is an expert at","donates to"]; -for(var a=0;a<30;a++){ - sentence+="#"+names[Math.floor(Math.random()*names.length)]+" "+arr[Math.round(Math.random()*4)]+" #"+sugg[Math.floor(Math.random()*sugg.length)]+" "; +var arr2=["is used by","is liked by","employs"]; +for(var a=0;a<10;a++){ + if(Math.random()>0.5){ + sentence+="#"+names[Math.floor(Math.random()*names.length)]+" "+arr[Math.round(Math.random()*4)]+" #"+sugg[Math.floor(Math.random()*sugg.length)]+" "; + }else{ + sentence+="#"+sugg[Math.floor(Math.random()*sugg.length)]+" "+arr2[Math.round(Math.random()*2)]+" #"+names[Math.floor(Math.random()*names.length)]+" "; + + } } var counter=0; @@ -23,12 +30,12 @@ setTimeout( Robot, 1000 ); }); -/* -var answer = confirm ("Would you like a tutorial?") + +/*var answer = confirm ("Would you like a tutorial?") if (answer) -setTimeout( Robot, 100 ); +setTimeout( Robot, 100 );*/ + -*/ function Robot(){ -- cgit v1.3.1