diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-26 22:47:27 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2018-11-26 22:47:27 +0100 |
commit | aaefd015deaea6e49c32311e0dc76286662408fd (patch) | |
tree | 678da8ab7cbbf17efc928fa65f3aa0d391784b9f | |
parent | de0f73565ad1d30e6cd772f6bdae0cbee795d66e (diff) | |
download | svg.js-aaefd015deaea6e49c32311e0dc76286662408fd.tar.gz svg.js-aaefd015deaea6e49c32311e0dc76286662408fd.zip |
fix bugs in runner, fix imports
-rw-r--r-- | dist/svg.js | 15 | ||||
-rw-r--r-- | src/animation/Runner.js | 10 | ||||
-rw-r--r-- | src/elements/Dom.js | 2 | ||||
-rw-r--r-- | src/svg.js | 2 |
4 files changed, 14 insertions, 15 deletions
diff --git a/dist/svg.js b/dist/svg.js index eb0d90d..3406d4a 100644 --- a/dist/svg.js +++ b/dist/svg.js @@ -1,12 +1,12 @@ /*! -* svg.js - A lightweight library for manipulating and animating SVG. +* @svgdotjs/svg.js - A lightweight library for manipulating and animating SVG. * @version 3.0.0 * https://svgdotjs.github.io/ * * @copyright Wout Fierens <wout@mick-wout.com> * @license MIT * -* BUILT: Sat Nov 24 2018 14:31:28 GMT+0100 (GMT+01:00) +* BUILT: Mon Nov 26 2018 22:45:55 GMT+0100 (GMT+01:00) */; var SVG = (function () { 'use strict'; @@ -5364,7 +5364,7 @@ var SVG = (function () { _this.enabled = true; _this._time = 0; - _this._last = 0; // At creation, the runner is in reseted state + _this._lastTime = 0; // At creation, the runner is in reseted state _this._reseted = true; // Save transforms applied to this runner @@ -5596,7 +5596,7 @@ var SVG = (function () { this._lastPosition = position; // 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; @@ -5608,12 +5608,11 @@ var SVG = (function () { var declarative = this._isDeclarative; - this.done = !declarative && !justFinished && this._time >= duration; // Call initialise and the run function + this.done = !declarative && !justFinished && this._time >= duration; // Runner is running. So its not in reseted state anymore - if (running || declarative) { - // Runner is running. So its not in reseted state anymore - this._reseted = false; + this._reseted = false; // Call initialise and the run function + if (running || declarative) { this._initialise(running); // clear the transforms on this runner so they dont get added again and again 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' @@ -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) { |