Skip to content

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

@Tino-Toni

Description

@Tino-Toni

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions