OSDN Git Service

Fixed network graph keyboard nav
authorrandx <dmitriy.zaporozhets@gmail.com>
Fri, 22 Jun 2012 20:29:31 +0000 (23:29 +0300)
committerrandx <dmitriy.zaporozhets@gmail.com>
Fri, 22 Jun 2012 20:29:31 +0000 (23:29 +0300)
app/assets/javascripts/graph.js
app/assets/stylesheets/common.scss
app/assets/stylesheets/gitlab_bootstrap.scss

index 163aa13..434cf70 100644 (file)
@@ -1,5 +1,6 @@
 function initGraphNav() { 
-  $("body").keydown(function(e) {
+  $(".graph svg").css("position", "relative");
+  $("body").bind("keyup", function(e) {
     if(e.keyCode == 37) { // left
       $(".graph svg").animate({ left: "+=400" });
     } else if(e.keyCode == 39) { // right