BigW Consortium Gitlab

Commit 1ae9c697 by Sato Hiroyuki

Draging network graph is replaced by vertical scrolling.

parent 16d3425a
......@@ -122,22 +122,11 @@ class BranchGraph
bindEvents: ->
drag = {}
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
mouseup: =>
$(window).off "mousemove", dragger
$(element).scroll (event) =>
@renderPartialGraph()
$(window).on
keydown: (event) =>
# left
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