Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
Signed-off-by: Niels van Hoorn <nvh@nvh.io>
  • Loading branch information
nvh committed Sep 15, 2016
1 parent 6c3e0ca commit 40b20be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions framer/Animation.coffee
Expand Up @@ -36,6 +36,9 @@ evaluateRelativeProperty = (target, k, v) ->
class exports.Animation extends BaseClass class exports.Animation extends BaseClass


_.defaults(options, parameters.options) _.defaults(options, parameters.options)
# 'properties' are the layer properties that will be animated
# 'options' are the animationOptions for this animation
# It's also possible to provide options through an 'options' key in the 'properties object'
constructor: (properties={}, options={}) -> constructor: (properties={}, options={}) ->


delete parameters.options delete parameters.options
Expand Down
2 changes: 2 additions & 0 deletions framer/Layer.coffee
Expand Up @@ -885,6 +885,8 @@ class exports.Layer extends BaseClass
############################################################## ##############################################################
## ANIMATION ## ANIMATION


# Used to animate to a state with a specific name
# We lookup the stateName and call 'animate' with the properties of the state
animateToState: (stateName, options={}) -> animateToState: (stateName, options={}) ->
properties = @_stateMachine.switchTo stateName properties = @_stateMachine.switchTo stateName
if @_stateMachine.previousName is @_stateMachine.currentName if @_stateMachine.previousName is @_stateMachine.currentName
Expand Down

0 comments on commit 40b20be

Please sign in to comment.