Permalink
Browse files

Add animation options to snapToPreviousPage

  • Loading branch information...
nvh committed Nov 17, 2017
1 parent 021b060 commit 58d7faf0bbea478689d5cef8f02881d6b80f75ad
Showing with 3 additions and 2 deletions.
  1. +3 −2 framer/Components/PageComponent.coffee
@@ -80,9 +80,10 @@ class exports.PageComponent extends ScrollComponent
nextPage ?= @closestPage
@snapToPage(nextPage, animate, animationOptions)
snapToPreviousPage: ->
snapToPreviousPage: (animate=true, animationOptions=null) ->
return unless @previousPage
@snapToPage(@previousPage)
animationOptions ?= @animationOptions
@snapToPage(@previousPage, animate, animationOptions)
# Modify the previous page stack so we don"t end up in a loop
@_previousPages = @_previousPages[0..@_previousPages.length-3]

0 comments on commit 58d7faf

Please sign in to comment.