Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Better print output for animations
- Loading branch information
Showing
with
9 additions
and
2 deletions.
-
+9
−2
framer/Animation.coffee
|
@@ -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 |
|
|
|
|
|