summaryrefslogtreecommitdiffstats
path: root/src
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
parentde0f73565ad1d30e6cd772f6bdae0cbee795d66e (diff)
downloadsvg.js-aaefd015deaea6e49c32311e0dc76286662408fd.tar.gz
svg.js-aaefd015deaea6e49c32311e0dc76286662408fd.zip
fix bugs in runner, fix imports
Diffstat (limited to 'src')
-rw-r--r--src/animation/Runner.js10
-rw-r--r--src/elements/Dom.js2
-rw-r--r--src/svg.js2
3 files changed, 7 insertions, 7 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
diff --git a/src/elements/Dom.js b/src/elements/Dom.js
index 5d7dbac..f6e72c9 100644
--- a/src/elements/Dom.js
+++ b/src/elements/Dom.js
@@ -7,7 +7,7 @@ import {
makeNode,
register
} from '../utils/adopter.js'
-import { find } from '../modules/core/selector'
+import { find } from '../modules/core/selector.js'
import { globals } from '../utils/window.js'
import { map } from '../utils/utils.js'
import { ns } from '../modules/core/namespaces.js'
diff --git a/src/svg.js b/src/svg.js
index e88b825..f6c4bc5 100644
--- a/src/svg.js
+++ b/src/svg.js
@@ -1,5 +1,5 @@
import * as svgMembers from './main.js'
-import { makeInstance } from './utils/adopter'
+import { makeInstance } from './utils/adopter.js'
// The main wrapping element
export default function SVG (element) {