Skip to content

slickGoTo has the wrong animation direction when moving from the first to last index #1869

Open
@juansalvatore

Description

@juansalvatore

"slickGoTo" has the wrong animation direction when moving from the first to last index and from last to first

Codesandbox example: https://codesandbox.io/s/slickgoto-issue-dhf76
Steps to reproduce:

  • Go to https://dhf76.csb.app/
  • Click on 1, 2, 3 and you'll see that the animation works ok
  • Now try clicking on 1 and then 10
    Current result: The animation moves to the right from 1 all over to 10.
    Expected result: The animation moves to the left just 1 slide.

This happens either way if infinite is set to true in center mode

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions