From 40b20be293c78bc469a1b6b1cd8cf341c6e6090c Mon Sep 17 00:00:00 2001 From: Niels van Hoorn Date: Wed, 14 Sep 2016 14:17:26 +0200 Subject: [PATCH] Added comments Signed-off-by: Niels van Hoorn --- framer/Animation.coffee | 3 +++ framer/Layer.coffee | 2 ++ 2 files changed, 5 insertions(+) diff --git a/framer/Animation.coffee b/framer/Animation.coffee index 8e06d33e0..544c91e3a 100644 --- a/framer/Animation.coffee +++ b/framer/Animation.coffee @@ -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 diff --git a/framer/Layer.coffee b/framer/Layer.coffee index d86ce77ee..20886bfdd 100644 --- a/framer/Layer.coffee +++ b/framer/Layer.coffee @@ -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