diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-20 17:40:17 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-20 17:40:17 +0100 |
commit | efc383d4dc005046a76da4134cd25e8aa11b8042 (patch) | |
tree | 545445683eff25051a67e7ff2628e63da9f89b3f /src/animation | |
parent | 2b37d7ba5b4267b39c86f9aba5fb14a1b376e846 (diff) | |
download | svg.js-efc383d4dc005046a76da4134cd25e8aa11b8042.tar.gz svg.js-efc383d4dc005046a76da4134cd25e8aa11b8042.zip |
add register for insertBefore and insertAfter
Diffstat (limited to 'src/animation')
-rw-r--r-- | src/animation/Timeline.js | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/animation/Timeline.js b/src/animation/Timeline.js index 6abcb80..6e1ed8d 100644 --- a/src/animation/Timeline.js +++ b/src/animation/Timeline.js @@ -38,16 +38,11 @@ export default class Timeline extends EventTarget { this._lastStepTime = 0 } - /** - * - */ - // schedules a runner on the timeline schedule (runner, delay, when) { - // FIXME: how to sort? maybe by runner id? if (runner == null) { return this._runners.map(makeSchedule).sort(function (a, b) { - return (a.start - b.start) || (a.duration - b.duration) + return a.runner.id - b.runner.id }) } @@ -189,7 +184,7 @@ export default class Timeline extends EventTarget { // Update the time this._time += dtTime this._lastStepTime = this._time - // this.fire('time', this._time) + this.fire('time', this._time) // Run all of the runners directly var runnersLeft = false @@ -238,6 +233,7 @@ export default class Timeline extends EventTarget { if (runnersLeft) { this._nextFrame = Animator.frame(this._step.bind(this)) } else { + this.fire('finished') this._nextFrame = null } return this |