aboutsummaryrefslogtreecommitdiffstats
path: root/src/animation
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-26 22:47:27 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2018-11-26 22:47:27 +0100
commitaaefd015deaea6e49c32311e0dc76286662408fd (patch)
tree678da8ab7cbbf17efc928fa65f3aa0d391784b9f /src/animation
parentde0f73565ad1d30e6cd772f6bdae0cbee795d66e (diff)
downloadsvg.js-aaefd015deaea6e49c32311e0dc76286662408fd.tar.gz
svg.js-aaefd015deaea6e49c32311e0dc76286662408fd.zip
fix bugs in runner, fix imports
Diffstat (limited to 'src/animation')
-rw-r--r--src/animation/Runner.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/animation/Runner.js b/src/animation/Runner.js
index bb8d5e7..125c4c5 100644
--- a/src/animation/Runner.js
+++ b/src/animation/Runner.js
@@ -48,7 +48,7 @@ export default class Runner extends EventTarget {
// Store the state of the runner
this.enabled = true
this._time = 0
- this._last = 0
+ this._lastTime = 0
// At creation, the runner is in reseted state
this._reseted = true
@@ -264,7 +264,7 @@ export default class Runner extends EventTarget {
// Figure out if we just started
var duration = this.duration()
- var justStarted = this._lastTime < 0 && this._time > 0
+ var justStarted = this._lastTime <= 0 && this._time > 0
var justFinished = this._lastTime < this._time && this.time > duration
this._lastTime = this._time
if (justStarted) {
@@ -277,11 +277,11 @@ export default class Runner extends EventTarget {
var declarative = this._isDeclarative
this.done = !declarative && !justFinished && this._time >= duration
+ // Runner is running. So its not in reseted state anymore
+ this._reseted = false
+
// Call initialise and the run function
if (running || declarative) {
- // Runner is running. So its not in reseted state anymore
- this._reseted = false
-
this._initialise(running)
// clear the transforms on this runner so they dont get added again and again