Skip to content

Commit

Permalink
Trim whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
tompedals committed Feb 5, 2016
1 parent 872e0f0 commit 4bf4c6f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/turbolinks/scroll_manager.coffee
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
class Turbolinks.ScrollManager
constructor: (@delegate) ->

start: ->
unless @started
addEventListener("scroll", @onScroll, false)
@onScroll()
@started = true

stop: ->
if @started
removeEventListener("scroll", @onScroll, false)
@started = false

scrollToElement: (element) ->
element.scrollIntoView()

scrollToPosition: ({x, y}) ->
window.scrollTo(x, y)

Expand All @@ -25,5 +25,3 @@ class Turbolinks.ScrollManager

updatePosition: (@position) ->
@delegate?.scrollPositionChanged(@position)


0 comments on commit 4bf4c6f

Please sign in to comment.