vis_files/init.js
/// Determines what is done when a key is pressed
Determines what is done when a key is pressed
Determines what is done when a key is pressed
function checkKey(e) 
{
  e = e || window.event;
	if (e.keyCode == '37'){  
		playtime--; if(playtime < 0) playtime = 0;
	}
	if (e.keyCode == '39'){  
		playtime++; if(playtime > playtimemax-1) playtime = playtimemax-1;
	}	
	var num = tree[page].child[ps].child[pss].child.length;
	var val = pagesubsubsub[page][ps][pss];
	if (e.keyCode == '38'){  
		if(val > 0) changepage(-1,-1,-1,val-1);
		 e.preventDefault();
	}
	if (e.keyCode == '40'){  
		if(val < num-1) changepage(-1,-1,-1,val+1);
		 e.preventDefault();
	}
	plot_results();
	buttonplot();
}
function checkKey ( e ) { e = e || window . event ; if ( e . keyCode == '37' ) { playtime -- ; if ( playtime < 0 ) playtime = 0 ; } if ( e . keyCode == '39' ) { playtime ++ ; if ( playtime > playtimemax - 1 ) playtime = playtimemax - 1 ; } var num = tree [ page ] . child [ ps ] . child [ pss ] . child . length ; var val = pagesubsubsub [ page ] [ ps ] [ pss ] ; if ( e . keyCode == '38' ) { if ( val > 0 ) changepage ( - 1 , - 1 , - 1 , val - 1 ) ; e . preventDefault ( ) ; } if ( e . keyCode == '40' ) { if ( val < num - 1 ) changepage ( - 1 , - 1 , - 1 , val + 1 ) ; e . preventDefault ( ) ; } plot_results ( ) ; buttonplot ( ) ; }
Determines what is done when a key is pressed
Determines what is done when a key is pressed
// Left arrow // Right arrow // Up arrow // Down arrow