Commit 1ae9c697 authored by Sato Hiroyuki's avatar Sato Hiroyuki

Draging network graph is replaced by vertical scrolling.

parent 16d3425a
...@@ -122,22 +122,11 @@ class BranchGraph ...@@ -122,22 +122,11 @@ class BranchGraph
bindEvents: -> bindEvents: ->
drag = {} drag = {}
element = @element element = @element
dragger = (event) ->
element.scrollLeft drag.sl - (event.clientX - drag.x)
element.scrollTop drag.st - (event.clientY - drag.y)
element.on mousedown: (event) ->
drag =
x: event.clientX
y: event.clientY
st: element.scrollTop()
sl: element.scrollLeft()
$(window).on "mousemove", dragger
$(window).on $(element).scroll (event) =>
mouseup: =>
$(window).off "mousemove", dragger
@renderPartialGraph() @renderPartialGraph()
$(window).on
keydown: (event) => keydown: (event) =>
# left # left
element.scrollLeft element.scrollLeft() - 50 if event.keyCode is 37 element.scrollLeft element.scrollLeft() - 50 if event.keyCode is 37
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment