Permalink
Browse files

Make sure gradient is always a class when switching states or startin…

…g animations

Fixes framer/company#5105
Fixes framer/company#5104
  • Loading branch information...
jonastreub committed Jun 28, 2017
1 parent ae0b628 commit 272bb60ebc97dfab83b20eeadd7648226c96458d
Showing with 4 additions and 1 deletion.
  1. +1 −1 framer/Animation.coffee
  2. +3 −0 framer/Gradient.coffee
View
@@ -331,7 +331,7 @@ class exports.Animation extends BaseClass
else if Color.isValidColorProperty(k, v)
animatableProperties[k] = new Color(v)
else if k is "gradient" and not _.isEmpty(Gradient._asPlainObject(v))
animatableProperties[k] = v
animatableProperties[k] = new Gradient(v)
return animatableProperties
View
@@ -4,6 +4,9 @@
class exports.Gradient extends BaseClass
constructor: (options = {}) ->
if options instanceof Gradient then return options
options.start ?= "black"
options.end ?= "white"
options.angle ?= 0

0 comments on commit 272bb60

Please sign in to comment.