Permalink
Browse files

Better print output for animations

  • Loading branch information...
Floris Verloop
Floris Verloop committed Feb 17, 2016
1 parent e2e7852 commit 5c72995e8b2fbb30e2a01ca214345f7c3a50a691
Showing with 9 additions and 2 deletions.
  1. +9 −2 framer/Animation.coffee
View
@@ -4,7 +4,7 @@ Utils = require "./Utils"
{Config} = require "./Config"
{Defaults} = require "./Defaults"
{EventEmitter} = require "./EventEmitter"
{BaseClass} = require "./BaseClass"
{LinearAnimator} = require "./Animators/LinearAnimator"
{BezierCurveAnimator} = require "./Animators/BezierCurveAnimator"
@@ -37,7 +37,7 @@ evaluateRelativeProperty = (target, k, v) ->
# Todo: this would normally be BaseClass but the properties keyword
# is not compatible and causes problems.
class exports.Animation extends EventEmitter
class exports.Animation extends BaseClass
constructor: (options={}) ->
@@ -65,6 +65,9 @@ class exports.Animation extends EventEmitter
@_originalState = @_currentState()
@_repeatCounter = @options.repeat
@define "isAnimating",
get: -> @ in @options.layer.context.animations
start: =>
if @options.layer is null
@@ -270,6 +273,10 @@ class exports.Animation extends EventEmitter
return animatableProperties
toInspect: ->
return "<#{@constructor.name} id:#{@id} isAnimating:#{@isAnimating} [#{_.keys(@options.properties)}]>"
##############################################################
## EVENT HELPERS

0 comments on commit 5c72995

Please sign in to comment.