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

feat: Support for ordering images right to left #460

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

DenverCoder1
Copy link

@DenverCoder1 DenverCoder1 commented Dec 20, 2023

Resolves #459

This adds support for the direction option in Glightbox which allows the images to flow from right to left instead of left to right to make it more natural for rtl language interfaces (such as Arabic and Hebrew).

const lightbox = GLightbox({ direction: 'rtl' });

When the direction is set to rtl, pressing the left arrow key, left lightbox button, or swiping right will advance to the next image and pressing the right arrow key, right lightbox button, or swiping left will go to the previous image. The slide and slideBack CSS effects are also reversed.

@DenverCoder1 DenverCoder1 marked this pull request as draft December 20, 2023 16:20
@DenverCoder1 DenverCoder1 marked this pull request as ready for review December 20, 2023 16:37
@DenverCoder1 DenverCoder1 marked this pull request as draft December 20, 2023 19:08
@DenverCoder1 DenverCoder1 marked this pull request as ready for review December 20, 2023 19:17
@DenverCoder1 DenverCoder1 marked this pull request as draft December 23, 2023 22:26
@DenverCoder1 DenverCoder1 marked this pull request as ready for review December 23, 2023 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RTL Support (reverse image order)
1 participant