Skip to content

Commit

Permalink
Merge pull request #687 from mkszepp/fix-move-over
Browse files Browse the repository at this point in the history
Fix styling calculation (wrong replacing from jquery)
  • Loading branch information
mkszepp authored Oct 13, 2023
2 parents 9e18297 + a048402 commit a9d50ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions liquid-fire/src/transitions/move-over.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit a9d50ab

Please sign in to comment.