Graph: navigation with keyboard
This commit is contained in:
parent
bcfdacf0d4
commit
a719bfc931
4 changed files with 43 additions and 18 deletions
9
app/assets/javascripts/graph.js
Normal file
9
app/assets/javascripts/graph.js
Normal file
|
@ -0,0 +1,9 @@
|
|||
function initGraphNav() {
|
||||
$("body").keydown(function(e) {
|
||||
if(e.keyCode == 37) { // left
|
||||
$(".graph svg").animate({ left: "+=400" });
|
||||
} else if(e.keyCode == 39) { // right
|
||||
$(".graph svg").animate({ left: "-=400" });
|
||||
}
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue