Skip to content

Commit

Permalink
feat: support disable bounce for vertical mode
Browse files Browse the repository at this point in the history
  • Loading branch information
alziqziq committed Mar 3, 2021
1 parent 364186b commit 756afc6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/innerSliderUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ export const swipeMove = (e, spec) => {
let touchSwipeLength = touchObject.swipeLength;
if (!infinite) {
if (
(currentSlide === 0 && swipeDirection === "right") ||
(currentSlide + 1 >= dotCount && swipeDirection === "left") ||
(!canGoNext(spec) && swipeDirection === "left")
(currentSlide === 0 && (swipeDirection === "right" || swipeDirection === "down")) ||
(currentSlide + 1 >= dotCount && (swipeDirection === "left" || swipeDirection === "up")) ||
(!canGoNext(spec) && (swipeDirection === "left" || swipeDirection === "up"))
) {
touchSwipeLength = touchObject.swipeLength * edgeFriction;
if (edgeDragged === false && onEdge) {
Expand Down

0 comments on commit 756afc6

Please sign in to comment.