Skip to content

Add option to animate slides when navigating #2175

@amartini

Description

@amartini

Hey guys, inspecting the code I found that if I change

  goTo(index) {
    this.mainScroll.moveIndexBy(this.getLoopedIndex(index) - this.potentialIndex);
  }

to

  goTo(index) {
    this.mainScroll.moveIndexBy(this.getLoopedIndex(index) - this.potentialIndex, true);
  }

When i click the next/forward button or when I use the keyboard left/right arrow, the slide animate to the next image instead of instantly replacing it. There could be an option to enable that, all you have to do is set the default value of moveIndexBy second parameter (animate).

Thanks for the great work!

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