Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: #767 . #788

Merged
merged 8 commits into from
Feb 27, 2024
9 changes: 5 additions & 4 deletions src/components/ImageGallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,14 @@ class ImageGallery extends React.Component {
}

canSlideLeft() {
const { infinite } = this.props;
return infinite || this.canSlidePrevious();
const { infinite, isRTL } = this.props;
//reverse the logic if the slider has isRTL enabled
xiaolin marked this conversation as resolved.
Show resolved Hide resolved
return infinite || (isRTL ? this.canSlideNext() : this.canSlidePrevious());
}

canSlideRight() {
const { infinite } = this.props;
return infinite || this.canSlideNext();
const { infinite, isRTL } = this.props;
return infinite || isRTL ? this.canSlidePrevious() : this.canSlideNext();
xiaolin marked this conversation as resolved.
Show resolved Hide resolved
}

canSlidePrevious() {
Expand Down
Loading