Trigger callback when slide dragged is over centralised position #7394
Unanswered
mattwdavies
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Check that this is really a bug
Reproduction link
sandbox
Bug description
I cannot find a clear way to use the API to log the slide index that is hovered over the central position. (i.e the slide that will snap to centre when drag is released).
I have built a number line with drag and release functionality, that logs the current slide index on the screen. I have used a combination of the slides lengths and swiper.progress to roughly calculate when a slide is dragged over the middle, but it gets inaccurate when using different sized slides (see GIF)
Is there anything in the API that will allow me to highlight a slide when it is the chosen slide to snap to the middle?
Expected Behavior
No response
Actual Behavior
Swiper version
11.0.6
Platform/Target and Browser Versions
macOS, Chrome
Validations
Would you like to open a PR for this bug?
Beta Was this translation helpful? Give feedback.
All reactions