We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a74b418 + 22d6eff commit 6f3626cCopy full SHA for 6f3626c
src/react-elastic-carousel/components/Carousel.js
@@ -390,10 +390,18 @@ class Carousel extends React.Component {
390
// bail out of state update
391
return;
392
}
393
+ let swipedSliderPosition;
394
+ if (horizontalSwipe) {
395
+ if (isRTL) {
396
+ swipedSliderPosition = sliderPosition + deltaX;
397
+ } else {
398
+ swipedSliderPosition = sliderPosition - deltaX;
399
+ }
400
401
+ swipedSliderPosition = sliderPosition - deltaY;
402
403
return {
- swipedSliderPosition: horizontalSwipe
- ? sliderPosition - deltaX
- : sliderPosition - deltaY,
404
+ swipedSliderPosition,
405
isSwiping: true,
406
transitioning: true
407
};
0 commit comments