Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix snapping to currentPage
- Loading branch information
Showing
with
5 additions
and
4 deletions.
-
+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 |
|
|