Skip to content

Commit

Permalink
bump version
Browse files Browse the repository at this point in the history
### Fixed
- allow object input of `when` and `delay` to `animate()`

### Added
- added missing dmove function to runner
  • Loading branch information
Fuzzyma committed Nov 8, 2019
1 parent 2827a27 commit 4b92c58
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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/",
Expand Down
12 changes: 8 additions & 4 deletions src/animation/Runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -605,7 +605,7 @@ registerMethods({
.loop(o)
.element(this)
.timeline(timeline.play())
.schedule(delay, when)
.schedule(o.delay, o.when)
},

delay (by, when) {
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions src/elements/Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
}

Expand Down

0 comments on commit 4b92c58

Please sign in to comment.