Permalink
Browse files

Fix snapping to currentPage

  • Loading branch information...
Benjamin den Boer
Benjamin den Boer committed Apr 22, 2015
1 parent 66eea95 commit ced648f425b245cc3dc3f442cf5e116b22bdf2c0
Showing with 5 additions and 4 deletions.
  1. +5 −4 framer/Components/PageComponent.coffee
@@ -62,11 +62,12 @@ class exports.PageComponent extends ScrollComponent
return _.first(layers)
snapToPage: (page, animate=true, animationOptions=null) ->
return unless @currentPage isnt page
@scrollToLayer(page, @originX, @originY, animate, animationOptions)
@_previousPages.push(page)
@emit("change:previousPage", @previousPage)
@emit("change:currentPage", @currentPage)
if @currentPage isnt page
@_previousPages.push(page)
@emit("change:previousPage", @previousPage)
@emit("change:currentPage", @currentPage)
snapToNextPage: (direction="right", animate=true, animationOptions=null) ->
animationOptions ?= @animationOptions

0 comments on commit ced648f

Please sign in to comment.