From 6a09a3cabccd65b400b02bd3c2c5b595cd101ae3 Mon Sep 17 00:00:00 2001 From: Denis Medvedev Date: Sat, 21 Sep 2019 07:50:28 +0500 Subject: [PATCH] Keep css transition CSS transition was overridden for items if animate: true is set --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ad32cd2..4ef1537 100644 --- a/src/index.js +++ b/src/index.js @@ -60,7 +60,7 @@ class MagicGrid { style.position = "absolute"; if (this.animate) { - style.transition = `${this.useTransform ? "transform" : "top, left"} 0.2s ease`; + style.transition = getComputedStyle(this.items[i]).transition + ", " + `${this.useTransform ? "transform" : "top, left"} 0.2s ease`; } }