summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-11-08 09:55:24 +0100
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2019-11-08 09:55:24 +0100
commit4b92c587ccf15bdce2459b6e39850b7d6c4c6ec5 (patch)
treefea78e5100f6211cdebb95f6be0e215be5d323b8
parent2827a27531c661726d204d6da9d17c6f72d8e404 (diff)
downloadsvg.js-4b92c587ccf15bdce2459b6e39850b7d6c4c6ec5.tar.gz
svg.js-4b92c587ccf15bdce2459b6e39850b7d6c4c6ec5.zip
bump version3.0.15
### Fixed - allow object input of `when` and `delay` to `animate()` ### Added - added missing dmove function to runner
-rw-r--r--CHANGELOG.md9
-rw-r--r--package.json2
-rw-r--r--src/animation/Runner.js12
-rw-r--r--src/elements/Element.js4
4 files changed, 20 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bc68961..92cadc7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,14 @@ The document follows the conventions described in [“Keep a CHANGELOG”](http:
====
+## [3.0.15] - 2019-11-08
+
+### Fixed
+- allow object input of `when` and `delay` to `animate()`
+
+### Added
+- added missing dmove function to runner
+
## [3.0.14] - 2019-10-31
### Fixed
@@ -832,6 +840,7 @@ The document follows the conventions described in [“Keep a CHANGELOG”](http:
<!-- Headings above link to the releases listed here -->
+[3.0.15]: https://github.com/svgdotjs/svg.js/releases/tag/3.0.15
[3.0.14]: https://github.com/svgdotjs/svg.js/releases/tag/3.0.14
[3.0.13]: https://github.com/svgdotjs/svg.js/releases/tag/3.0.13
[3.0.12]: https://github.com/svgdotjs/svg.js/releases/tag/3.0.12
diff --git a/package.json b/package.json
index cd02f6e..00b6bb6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@svgdotjs/svg.js",
- "version": "3.0.14",
+ "version": "3.0.15",
"description": "A lightweight library for manipulating and animating SVG.",
"url": "https://svgdotjs.github.io/",
"homepage": "https://svgdotjs.github.io/",
diff --git a/src/animation/Runner.js b/src/animation/Runner.js
index 9568b70..8c0aca5 100644
--- a/src/animation/Runner.js
+++ b/src/animation/Runner.js
@@ -97,7 +97,7 @@ export default class Runner extends EventTarget {
var runner = new Runner(o.duration)
if (this._timeline) runner.timeline(this._timeline)
if (this._element) runner.element(this._element)
- return runner.loop(o).schedule(delay, when)
+ return runner.loop(o).schedule(o.delay, o.when)
}
schedule (timeline, delay, when) {
@@ -605,7 +605,7 @@ registerMethods({
.loop(o)
.element(this)
.timeline(timeline.play())
- .schedule(delay, when)
+ .schedule(o.delay, o.when)
},
delay (by, when) {
@@ -834,14 +834,18 @@ extend(Runner, {
return this._queueNumber('y', y)
},
- dx (x) {
+ dx (x = 0) {
return this._queueNumberDelta('x', x)
},
- dy (y) {
+ dy (y = 0) {
return this._queueNumberDelta('y', y)
},
+ dmove (x, y) {
+ return this.dx(x).dy(y)
+ },
+
_queueNumberDelta (method, to) {
to = new SVGNumber(to)
diff --git a/src/elements/Element.js b/src/elements/Element.js
index 264cea8..3bd97de 100644
--- a/src/elements/Element.js
+++ b/src/elements/Element.js
@@ -59,12 +59,12 @@ export default class Element extends Dom {
}
// Relative move over x axis
- dx (x) {
+ dx (x = 0) {
return this.x(new SVGNumber(x).plus(this.x()))
}
// Relative move over y axis
- dy (y) {
+ dy (y = 0) {
return this.y(new SVGNumber(y).plus(this.y()))
}