]> source.dussan.org Git - svg.js.git/commitdiff
added amove methods to runner (fixes #1131)
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>
Sun, 3 Sep 2023 09:33:51 +0000 (11:33 +0200)
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>
Sun, 3 Sep 2023 09:33:51 +0000 (11:33 +0200)
src/animation/Runner.js
svg.js.d.ts

index 4ad222f86400b087ad65d14f7f9b53d1620f954f..8fd4b8be9f412dc6a6afc9ee1c8092b949c60809 100644 (file)
@@ -899,6 +899,14 @@ extend(Runner, {
     return this._queueNumber('y', y)
   },
 
+  ax(x) {
+    return this._queueNumber('ax', x)
+  },
+
+  ay(y) {
+    return this._queueNumber('ay', y)
+  },
+
   dx(x = 0) {
     return this._queueNumberDelta('x', x)
   },
@@ -980,6 +988,10 @@ extend(Runner, {
     return this.x(x).y(y)
   },
 
+  amove(x, y) {
+    return this.ax(x).ay(y)
+  },
+
   // Add animatable center
   center(x, y) {
     return this.cx(x).cy(y)
index 520ae9880cd5e08c96e092abe4cfeb84c615986d..37ee5269503092dd77c4ca934c840bf4cc412bd9 100644 (file)
@@ -1019,12 +1019,15 @@ declare module '@svgdotjs/svg.js' {
     ): this
     x(x: number): this
     y(y: number): this
+    ax(x: number): this
+    ay(y: number): this
     dx(dx: number): this
     dy(dy: number): this
     cx(x: number): this
     cy(y: number): this
     dmove(dx: number, dy: number): this
     move(x: number, y: number): this
+    amove(x: number, y: number): this
     center(x: number, y: number): this
     size(width: number, height: number): this
     width(width: number): this