Permalink
Browse files

Added fix for Layer instance check after MobileScrollFix

  • Loading branch information...
nvh committed Sep 27, 2016
1 parent 3220f92 commit d25468198eef25e3a72863dcdcbbdd9f3abd39bb
Showing with 12 additions and 2 deletions.
  1. +2 −2 framer/Animation.coffee
  2. +1 −0 framer/Framer.coffee
  3. +9 −0 test/tests/LayerAnimationTest.coffee
View
@@ -82,8 +82,8 @@ class exports.Animation extends BaseClass
@_layer = layer
unless layer instanceof Layer
throw Error("Animation: missing layer")
unless layer instanceof _Layer
throw Error("Animation: missing layer")
@properties = Animation.filterAnimatableProperties(properties)
View
@@ -7,6 +7,7 @@ Framer._ = _
Framer.Utils = (require "./Utils")
Framer.Color = (require "./Color").Color
Framer.Layer = (require "./Layer").Layer
Framer._Layer = Framer.Layer # So it won't be overridden by MobileScrollFix
Framer.BackgroundLayer = (require "./BackgroundLayer").BackgroundLayer
Framer.VideoLayer = (require "./VideoLayer").VideoLayer
Framer.SVGLayer = (require "./SVGLayer").SVGLayer
@@ -201,6 +201,15 @@ describe "LayerAnimation", ->
stopped.should.equal true
it "should work, even with MobileScrollFix enabled", (done) ->
layer = new Layer()
Framer.Extras.MobileScrollFix.enable()
layer.animationOptions = time: AnimationTime
animation = layer.animate x: 100
animation.start()
Utils.delay animation.options.time, ->
done()
describe "Context", ->
it "should list running animations", ->

0 comments on commit d254681

Please sign in to comment.