Permalink
Browse files

Calling options.completion in animationFinished()

  • Loading branch information...
nvh committed Jul 26, 2016
1 parent 1fc72b8 commit 358a3f58dbb9ded1e3d0d0055a7aea44065e12a9
Showing with 2 additions and 3 deletions.
  1. +2 −3 framer/Layer.coffee
View
@@ -925,9 +925,8 @@ class exports.Layer extends BaseClass
animationFinished = =>
for k, v of nonAnimatableProperties
@[k] = v
# If we changed the state, we send the event that we did
if stateName? and _.last(@_previousStates) isnt stateName
@states.emit(Events.StateDidSwitch, _.last(@states._previousStates), @states.currentName, @)
options.completion?()
animation.once Events.AnimationStop, animationFinished
started = animation.start() if start
if not started

0 comments on commit 358a3f5

Please sign in to comment.