Skip to content

Commit a248ca1

Browse files
committed
fix(effect-cards): fix offset in vertical direction when rotate is unset
fixes #8075
1 parent bba693c commit a248ca1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/effect-cards/effect-cards.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ export default function EffectCards({ swiper, extendParams, on }) {
5959
rotate += -28 * progress * subProgress;
6060
scale += -0.5 * subProgress;
6161
tXAdd += 96 * subProgress;
62-
tY = `${-25 * subProgress * Math.abs(progress)}%`;
62+
tY = `${
63+
(params.rotate || swiper.isHorizontal() ? -25 : 0) * subProgress * Math.abs(progress)
64+
}%`;
6365
}
6466
if (progress < 0) {
6567
// next

0 commit comments

Comments
 (0)