Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

Use the y property as asctiveProp to make sure callbacks are triggered last when both x and y are active #997

Julian Garnier03f21d019868
diff --git a/lib/anime.esm.js b/lib/anime.esm.js
index d591806b..ca728991 100644
--- a/lib/anime.esm.js
+++ b/lib/anime.esm.js
@@ -1,6 +1,6 @@
/**
* anime.js - ESM
- * @version v4.0.1
+ * @version v4.0.2
* @author Julian Garnier
* @license MIT
* @copyright (c) 2025 Julian Garnier
@@ -450,7 +450,7 @@ const globals = {
tickThreshold: 200,
};
-const globalVersions = { version: '4.0.1', engine: null };
+const globalVersions = { version: '4.0.2', engine: null };
if (isBrowser) {
if (!win.AnimeJS) win.AnimeJS = [];
@@ -5545,7 +5545,7 @@ class Draggable {
this.canScroll = false;
this.enabled = false;
this.initialized = false;
- this.activeProp = this.disabled[0] ? yProp : xProp;
+ this.activeProp = this.disabled[1] ? xProp : yProp;
this.animate.animations[this.activeProp].onRender = () => {
const hasUpdated = this.updated;
const hasMoved = this.grabbed && hasUpdated;
diff --git a/src/draggable.js b/src/draggable.js
index b0302788..205a3109 100644
--- a/src/draggable.js
+++ b/src/draggable.js
@@ -432,7 +432,7 @@ export class Draggable {
this.canScroll = false;
this.enabled = false;
this.initialized = false;
- this.activeProp = this.disabled[0] ? yProp : xProp;
+ this.activeProp = this.disabled[1] ? xProp : yProp;
this.animate.animations[this.activeProp].onRender = () => {
const hasUpdated = this.updated;
const hasMoved = this.grabbed && hasUpdated;
diff --git a/types/index.js b/types/index.js
index 671cfef2..f1dc3a31 100644
--- a/types/index.js
+++ b/types/index.js
@@ -1,6 +1,6 @@
/**
* anime.js - ESM
- * @version v4.0.1
+ * @version v4.0.2
* @author Julian Garnier
* @license MIT
* @copyright (c) 2025 Julian Garnier
@@ -137,7 +137,7 @@ const globals = {
/** @type {Number} */
tickThreshold: 200,
};
-const globalVersions = { version: '4.0.1', engine: null };
+const globalVersions = { version: '4.0.2', engine: null };
if (isBrowser) {
if (!win.AnimeJS)
win.AnimeJS = [];
@@ -4897,7 +4897,7 @@ class Draggable {
this.canScroll = false;
this.enabled = false;
this.initialized = false;
- this.activeProp = this.disabled[0] ? yProp : xProp;
+ this.activeProp = this.disabled[1] ? xProp : yProp;
this.animate.animations[this.activeProp].onRender = () => {
const hasUpdated = this.updated;
const hasMoved = this.grabbed && hasUpdated;