Skip to content

Commit

Permalink
fix(mousewheel): fix releaseOnEdges for freeMode
Browse files Browse the repository at this point in the history
fixes #6770
fixes #6799
  • Loading branch information
nolimits4web committed Jul 25, 2023
1 parent 068ee68 commit 8a83360
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/modules/mousewheel/mousewheel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,12 @@ export default function Mousewheel({ swiper, extendParams, on, emit }) {
if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction)
swiper.autoplay.stop();
// Return page scroll on edge positions
if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true;
if (
params.releaseOnEdges &&
(position === swiper.minTranslate() || position === swiper.maxTranslate())
) {
return true;
}
}
}

Expand Down

0 comments on commit 8a83360

Please sign in to comment.