Skip to content
Browse files

Made Animation backwards compatible

Signed-off-by: Niels van Hoorn <>
  • Loading branch information
nvh committed Sep 15, 2016
1 parent 8d510b0 commit 32ac81b1d1282cd3898d880163b380fd04e83d71
Showing with 13 additions and 3 deletions.
  1. +13 −3 framer/
@@ -38,10 +38,20 @@ class exports.Animation extends BaseClass
# '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'
# or provide the options at top level and use 'properties' to specify the properties (old API)
constructor: (properties={}, options={}) ->
_.defaults(options, properties.options)

delete properties.options
if properties.options?
_.defaults(options, properties.options)
delete properties.options
else if
#Support old properties: syntax
layer = properties.layer
props =
delete properties.layer
_.defaults(options, properties)
properties = props
properties.layer = layer
@options = _.cloneDeep Defaults.getDefaults "Animation", options
super properties
@layer = properties.layer ? null

0 comments on commit 32ac81b

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