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

upper bounds check at "ontouchend" will stop swiping at second or third picture #445

Open
Tino-Toni opened this issue Dec 30, 2023 · 0 comments

Comments

@Tino-Toni
Copy link

Upper bounds check at "ontouchend" will stop swiping at second or third picture (depends on screen type) using classic theme.

Calculation of

     isPastBounds = !this.index && this.deltaX > 0 ||
                    this.index == this.length - 1 && this.deltaX < 0;

uses "this.length" value which is not the count of pictures in galleria (in most cases the value is "2" or "3"). This will stop increment of index and result in showing the same picture again. This only happens using swipe gesture. (galleria.js, line 6859)

Using
isPastBounds = !this.index && this.deltaX > 0 || this.index == this.child.childElementCount - 1 - 1 && this.deltaX < 0;
instead would solve the issue.

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

No branches or pull requests

1 participant