Skip to content

Commit

Permalink
Better print output for animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Floris Verloop committed Feb 17, 2016
1 parent e2e7852 commit 5c72995
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions framer/Animation.coffee
Expand Up @@ -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"
Expand Down Expand Up @@ -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={}) ->

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -270,6 +273,10 @@ class exports.Animation extends EventEmitter

return animatableProperties

toInspect: ->
return "<#{@constructor.name} id:#{@id} isAnimating:#{@isAnimating} [#{_.keys(@options.properties)}]>"


##############################################################
## EVENT HELPERS

Expand Down

0 comments on commit 5c72995

Please sign in to comment.