Permalink
Browse files

Merge branch 'feature/gradients-animation-fix'

  • Loading branch information...
eelco committed Jul 6, 2017
2 parents 6e48e05 + 14ceea0 commit e1e83168252adf59ce7bba3272f4bfc9229c912c
Showing with 28 additions and 1 deletion.
  1. +1 −1 framer/LayerPropertyProxy.coffee
  2. +27 −0 test/tests/LayerAnimationTest.coffee
@@ -12,7 +12,7 @@ class exports.LayerPropertyProxy
for prop in Object.getOwnPropertyNames(target)
targetDesc = Object.getOwnPropertyDescriptor(target, prop)
desc =
enumerable: target.enumerable
enumerable: targetDesc.enumerable
get: getter.bind(target, prop)
set: setter.bind(target, prop)
Object.defineProperty(proxy, prop, desc)
@@ -880,6 +880,33 @@ describe "LayerAnimation", ->
layer.animate
gradient: null
it "should animate to a gradient object", (done) ->
layer = new Layer
gradient:
start: "blue"
layer2 = new Layer
gradient:
end: "red"
layer.on Events.AnimationEnd, ->
Gradient.equal(layer.gradient, layer2.gradient).should.be.true
done()
layer.animate
gradient: layer2.gradient
it "should animate to a gradient object in a state", (done) ->
layer = new Layer
gradient:
start: "blue"
layer2 = new Layer
gradient:
end: "red"
layer.states.test =
gradient: layer2.gradient
layer.on Events.AnimationEnd, ->
Gradient.equal(layer.gradient, layer2.gradient).should.be.true
done()
layer.animate "test"
describe "Border radius animations", (done) ->
it "should animate border radius from number to number", (done) ->

0 comments on commit e1e8316

Please sign in to comment.