Permalink
Browse files

Added comments

Signed-off-by: Niels van Hoorn <nvh@nvh.io>
  • Loading branch information...
nvh committed Sep 14, 2016
1 parent 6c3e0ca commit 40b20be293c78bc469a1b6b1cd8cf341c6e6090c
Showing with 5 additions and 0 deletions.
  1. +3 −0 framer/Animation.coffee
  2. +2 −0 framer/Layer.coffee
View
@@ -36,6 +36,9 @@ evaluateRelativeProperty = (target, k, v) ->
class exports.Animation extends BaseClass
_.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={}) ->
delete parameters.options
View
@@ -885,6 +885,8 @@ class exports.Layer extends BaseClass
##############################################################
## 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={}) ->
properties = @_stateMachine.switchTo stateName
if @_stateMachine.previousName is @_stateMachine.currentName

0 comments on commit 40b20be

Please sign in to comment.