merge graph.js into projects.js
This commit is contained in:
parent
41ec540033
commit
c28722689d
3 changed files with 8 additions and 11 deletions
|
@ -1,10 +0,0 @@
|
|||
initGraphNav = ->
|
||||
$('.graph svg').css 'position', 'relative'
|
||||
|
||||
$('body').bind 'keyup', (e) ->
|
||||
if e.keyCode is 37 # left
|
||||
$('.graph svg').animate left: '+=400'
|
||||
else if e.keyCode is 39 # right
|
||||
$('.graph svg').animate left: '-=400'
|
||||
|
||||
window.initGraphNav = initGraphNav
|
|
@ -22,3 +22,10 @@ $ ->
|
|||
# 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
|
||||
|
|
|
@ -10,5 +10,5 @@
|
|||
initGraph();
|
||||
$(function(){
|
||||
branchGraph($("#holder")[0]);
|
||||
initGraphNav();
|
||||
GraphNav.init();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue