Skip to content
Permalink
Browse files

Fix PageComponent.wrap issue

  • Loading branch information...
Koen Bok
Koen Bok committed Feb 9, 2016
1 parent 40a0c99 commit 9453b24a5054c834b3061cf72867d5afc94da9d1
Showing with 10 additions and 10 deletions.
  1. +10 −10 framer/Components/PageComponent.coffee
@@ -116,12 +116,12 @@ class exports.PageComponent extends ScrollComponent

setContentLayer: (contentLayer) ->
if @content
@_onAminateStop()
@content.off(Events.AnimationStart, @_onAminationStart)
@content.off(Events.AnimationStop, @_onAminationEnd)
@_onAnimationStop()
@content.off(Events.AnimationStart, @_onAnimationStart)
@content.off(Events.AnimationStop, @_onAnimationStop)
super contentLayer
@content.on(Events.AnimationStart, @_onAminationStart)
@content.on(Events.AnimationStop, @_onAminationEnd)
@content.on(Events.AnimationStart, @_onAnimationStart)
@content.on(Events.AnimationStop, @_onAnimationStop)

horizontalPageIndex: (page) ->
(_.sortBy(@content.children, (l) -> l.x)).indexOf(page)
@@ -140,18 +140,18 @@ class exports.PageComponent extends ScrollComponent
@_previousPages.push(currentPage)
@emit("change:currentPage", {old:@previousPage, new:currentPage})

_onAminationStart: =>
_onAnimationStart: =>
@_isMoving = true
@_isAnimating = true
@content.on("change:frame", @_onAminationStep)
@content.on("change:frame", @_onAnimationStep)

_onAminationStep: =>
_onAnimationStep: =>
@emit(Events.Move, @content.point)

_onAminationEnd: =>
_onAnimationStop: =>
@_isMoving = false
@_isAnimating = false
@content.off("change:frame", @_onAminationStep)
@content.off("change:frame", @_onAnimationStep)

_scrollEnd: =>

0 comments on commit 9453b24

Please sign in to comment.
You can’t perform that action at this time.