Skip to content

Commit

Permalink
fix(cards): fix slides swap issue in loop mode
Browse files Browse the repository at this point in the history
fixes #7823
  • Loading branch information
nolimits4web committed Jan 27, 2025
1 parent ff1bab8 commit e012e34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/events/onTouchMove.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ export default function onTouchMove(event) {
let time = new Date().getTime();

if (
params._loopSwapReset !== false &&
data.isMoved &&
data.allowThresholdMove &&
prevTouchesDirection !== swiper.touchesDirection &&
Expand Down
3 changes: 3 additions & 0 deletions src/modules/effect-cards/effect-cards.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,10 @@ export default function EffectCards({ swiper, extendParams, on }) {
setTransition,
perspective: () => true,
overwriteParams: () => ({
_loopSwapReset: false,
watchSlidesProgress: true,
loopAdditionalSlides: 3,
centeredSlides: true,
virtualTranslate: !swiper.params.cssMode,
}),
});
Expand Down

0 comments on commit e012e34

Please sign in to comment.