diff options
-rw-r--r-- | src/controller.js | 2 | ||||
-rw-r--r-- | src/runner.js | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/controller.js b/src/controller.js index b2c7d13..359dc9f 100644 --- a/src/controller.js +++ b/src/controller.js @@ -120,8 +120,6 @@ SVG.Spring = SVG.invent ({ extend: { step: function (current, target, dt, c) { -console.log(current, target, dt); - c.done = dt == Infinity if(dt == Infinity) return target if(dt == 0) return current diff --git a/src/runner.js b/src/runner.js index 5edf44a..308705f 100644 --- a/src/runner.js +++ b/src/runner.js @@ -17,6 +17,10 @@ SVG.Runner = SVG.invent({ ? SVG.defaults.timeline.duration : options + options = typeof options !== 'object' || options instanceof SVG.Stepper + ? options + : options.duration + // ensure that we get a controller options = typeof options === 'function' ? new SVG.Controller(options) @@ -51,7 +55,7 @@ SVG.Runner = SVG.invent({ animate: function (duration, delay, when) { - return new SVG.Runner(duration && duration.duration || duration) + return new SVG.Runner(duration) .element(this) .timeline(this.timeline()) .init(duration, delay, when) @@ -85,7 +89,7 @@ SVG.Runner = SVG.invent({ loop: function (duration, times, swing) { - return new SVG.Runner(duration.duration || duration) + return new SVG.Runner(duration) .element(this) .timeline(this.timeline()) .initLoop(duration, times, swing) @@ -130,7 +134,7 @@ SVG.Runner = SVG.invent({ }, animate: function(duration, delay, when) { - var runner = new SVG.Runner(duration.duration || duration) + var runner = new SVG.Runner(duration) if(this._timeline) runner.element(this._timeline) if(this._element) runner.element(this._element) return runner.init(duration, delay, when) @@ -203,7 +207,7 @@ SVG.Runner = SVG.invent({ // FIXME: This definitely shouldn't make a new runner, this should just change // the looping behaviour of the current runner. loop: function (duration, times, swing) { - var runner = new SVG.Runner(duration.duration || duration) + var runner = new SVG.Runner(duration) if(this._timeline) runner.element(this._timeline) if(this._element) runner.element(this._element) return runner.initLoop(duration, times, swing) |