BranchGraph now loads async

Centralized keyboard and drag events for BranchGraph
This commit is contained in:
Koen Punt 2012-12-07 19:06:46 +01:00
parent 40576b8709
commit e1282d507f
6 changed files with 123 additions and 95 deletions

View file

@ -18,10 +18,3 @@ $ ->
# Ref switcher
$('.project-refs-select').on 'change', ->
$(@).parents('form').submit()
class @GraphNav
@init: ->
$('.graph svg').css 'position', 'relative'
$('body').bind 'keyup', (e) ->
$('.graph svg').animate(left: '+=400') if e.keyCode is 37 # left
$('.graph svg').animate(left: '-=400') if e.keyCode is 39 # right