You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or a way to get the current "most visible" slide index during the drag?
The splide.index value only changes after the drag has completed, but doesn't change during the drag.
Example:
Screen.Recording.2025-02-06.at.3.07.59.PM.mp4
The green color doesn't move while dragging, and it only moves to the new active slide after the dragging is completed (mouse/touch released).
Hoping to achieve an effect where the green color moves like 1, 2, 3, 4, 5 ... while the dragging user-action is going on (by mouse or by finger).
Edit: The only way I can think of, is to track the delta change in the translateX value of ul.splide__list and deduce the visible slide number from it. A very clunky way which needs you to also know the width of the slides in exact pixels.
Also, it does look like the aria-live value of splide__track changes from polite to off when a slide other than the active one becomes visible when dragging.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Or a way to get the current "most visible" slide index during the drag?
The
splide.index
value only changes after the drag has completed, but doesn't change during the drag.Example:
Screen.Recording.2025-02-06.at.3.07.59.PM.mp4
The green color doesn't move while dragging, and it only moves to the new active slide after the dragging is completed (mouse/touch released).
Hoping to achieve an effect where the green color moves like
1, 2, 3, 4, 5 ...
while the dragging user-action is going on (by mouse or by finger).Edit: The only way I can think of, is to track the delta change in the
translateX
value oful.splide__list
and deduce the visible slide number from it. A very clunky way which needs you to also know the width of the slides in exact pixels.Also, it does look like the
aria-live
value ofsplide__track
changes frompolite
tooff
when a slide other than the active one becomes visible when dragging.Beta Was this translation helpful? Give feedback.
All reactions