diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 11:12:26 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-08 11:12:26 +0100 |
commit | 834c05b0a251f38043a7961dab920f20720c1144 (patch) | |
tree | 36b610ca049952079468f03f1902f376124ddaa8 /src/animation | |
parent | 4702522137dac17a6312c521f3c1974eb839c5eb (diff) | |
download | svg.js-834c05b0a251f38043a7961dab920f20720c1144.tar.gz svg.js-834c05b0a251f38043a7961dab920f20720c1144.zip |
get rid of the fixmes and todos
Diffstat (limited to 'src/animation')
-rw-r--r-- | src/animation/Runner.js | 15 | ||||
-rw-r--r-- | src/animation/Timeline.js | 1 |
2 files changed, 6 insertions, 10 deletions
diff --git a/src/animation/Runner.js b/src/animation/Runner.js index f752185..4de127a 100644 --- a/src/animation/Runner.js +++ b/src/animation/Runner.js @@ -1,8 +1,10 @@ import { Controller, Ease, Stepper } from './Controller.js' import { extend } from '../utils/adopter.js' +import { from, to } from '../modules/core/gradiented.js' import { getOrigin } from '../utils/utils.js' import { noop, timeline } from '../modules/core/defaults.js' import { registerMethods } from '../utils/methods.js' +import { rx, ry } from '../modules/core/circled.js' import Animator from './Animator.js' import Box from '../types/Box.js' import EventTarget from '../types/EventTarget.js' @@ -668,9 +670,8 @@ extend(Runner, { : (affine != null ? affine : !isMatrix) // Create a morepher and set its type - const morpher = new Morphable() + const morpher = new Morphable(this._stepper) .type(affine ? TransformBag : Matrix) - .stepper(this._stepper) let origin let element @@ -883,12 +884,7 @@ extend(Runner, { return this.plot([a, b, c, d]) } - // FIXME: this needs to be rewritten such that the element is only accesed - // in the init function - return this._queueObject('plot', new this._element.MorphArray(a)) - - /* - var morpher = this._element.morphArray().to(a) + var morpher = this._element.MorphArray().to(a) this.queue(function () { morpher.from(this._element.array()) @@ -897,7 +893,6 @@ extend(Runner, { }) return this - */ }, // Add leading method @@ -926,3 +921,5 @@ extend(Runner, { return this } }) + +extend(Runner, { rx, ry, from, to }) diff --git a/src/animation/Timeline.js b/src/animation/Timeline.js index 3a731cb..790033a 100644 --- a/src/animation/Timeline.js +++ b/src/animation/Timeline.js @@ -225,7 +225,6 @@ export default class Timeline { } else if (runnerInfo.persist !== true) { // runner is finished. And runner might get removed - // TODO: Figure out end time of runner var endTime = runner.duration() - runner.time() + this._time if (endTime + this._persist < this._time) { |