diff --git a/lib/torque/animator.js b/lib/torque/animator.js index f4c7fb7..f908bc6 100644 --- a/lib/torque/animator.js +++ b/lib/torque/animator.js @@ -46,6 +46,9 @@ var cancelAnimationFrame = global.cancelAnimationFrame this.running = true; requestAnimationFrame(this._tick); this.options.onStart && this.options.onStart(); + if(this.options.steps === 1){ + this.running = false; + } }, isRunning: function() { @@ -80,6 +83,7 @@ var cancelAnimationFrame = global.cancelAnimationFrame this.range = torque.math.linear(0, this.options.steps); this.rangeInv = this.range.invert(); this.time(this._time); + this.start(); return this; },