From 46ee87a1c2fc373c629235010c05bd8d40b2cb9e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Sun, 3 Sep 2023 11:33:51 +0200 Subject: [PATCH] added amove methods to runner (fixes #1131) --- src/animation/Runner.js | 12 ++++++++++++ svg.js.d.ts | 3 +++ 2 files changed, 15 insertions(+) diff --git a/src/animation/Runner.js b/src/animation/Runner.js index 4ad222f..8fd4b8b 100644 --- a/src/animation/Runner.js +++ b/src/animation/Runner.js @@ -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) diff --git a/svg.js.d.ts b/svg.js.d.ts index 520ae98..37ee526 100644 --- a/svg.js.d.ts +++ b/svg.js.d.ts @@ -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 -- 2.39.5