From a048402ec05661a333b2ec3079b9c3a62478d3ba Mon Sep 17 00:00:00 2001 From: Markus Sanin Date: Fri, 13 Oct 2023 07:55:25 +0200 Subject: [PATCH] Fix styling calculation (wrong replacing from jquery) --- liquid-fire/src/transitions/move-over.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/liquid-fire/src/transitions/move-over.js b/liquid-fire/src/transitions/move-over.js index 2623ccf8..0be13e69 100644 --- a/liquid-fire/src/transitions/move-over.js +++ b/liquid-fire/src/transitions/move-over.js @@ -35,12 +35,12 @@ export default function moveOver(dimension, direction, opts) { function biggestSize(context, dimension) { const sizes = []; if (context.newElement) { - sizes.push(parseInt(context.newElement.style[dimension], 10)); - sizes.push(parseInt(context.newElement.parentElement.style[dimension], 10)); + sizes.push(parseInt(getComputedStyle(context.newElement)[dimension], 10)); + sizes.push(parseInt(getComputedStyle(context.newElement.parentElement)[dimension], 10)); } if (context.oldElement) { - sizes.push(parseInt(context.oldElement.style[dimension], 10)); - sizes.push(parseInt(context.oldElement.parentElement.style[dimension], 10)); + sizes.push(parseInt(getComputedStyle(context.oldElement)[dimension], 10)); + sizes.push(parseInt(getComputedStyle(context.oldElement.parentElement)[dimension], 10)); } return Math.max.apply(null, sizes); }