ui
ui copied to clipboard
Disabling "center" option in Carousel makes click behaviour strange
Hi there.
Disable the center options in Carousel, try to move the content by swipe and then click on the slide during animation is in progress to stop it. As results the carousel forwards one iteration back and it's very inconvenient, please check the video attached. Is this normal behaviour?
https://user-images.githubusercontent.com/3931476/170662758-2698ea6b-4978-4e6d-8596-287f557c26db.mov
Thanks!
Hi,
When you swipe the 5th slide in second carousel, it does not go past the left edge. 4th slide is still visible, therefore the script considers that you are selecting the 4th slide and it gets centered. If you would make a bit faster flick, then the script would navigate to the next slide regardless of the carousel position at the end of the swipe. Maybe I could tweak a flick detection.
It would be great to have the same tweak behaviour as we have it with the center options enabled, thank you!
It's really great js widget!
Hi,
When you swipe the 5th slide in second carousel, it does not go past the left edge. 4th slide is still visible, therefore the script considers that you are selecting the 4th slide and it gets centered. If you would make a bit faster flick, then the script would navigate to the next slide regardless of the carousel position at the end of the swipe. Maybe I could tweak a flick detection.
Ah I just got you, so you may try to click on the 5th slide once it is fully visible and carousel will navigate you back to 4th slide anyway, looks like there is problem with navigation exactly if the center options is disabled.
I do not understand where you see the problem. If center is true (default), then active slide will be the one that overlaps imaginary line that goes vertically in the middle of the carousel. If center is false, then this line is left border of the carousel. E.g., if at least one pixel of 4th slide overlaps left border, it will be marked as selected slide. Note: if "fast flick" is detected, then carousel slides to next/prev slide regardless of the position.
Check my new video please, as you can see:
center: trueonce I stop the slide, it goes center, looks ok and works properlycenter: falseonce I stop the slide 5 (slide 5 is fully visible) it moves the carouse to slide 4, why it happen?
It is not comfortable I think. It is more uncomfortable once you have many small items in carouse.
https://user-images.githubusercontent.com/3931476/176383331-5e6e0db4-d6e9-45e3-af7c-851762e1203e.mov
So, now I understand you. You expect the selected slide to be the most visible, but currently the script works as I described - it marks the slide as selected, which overlaps the left border. Thank you for your valuable feedback, I will change the algorithm.
It was hard to explain for me but you got it finally, thanks! Waiting for fix!
Hi, It also seems to work as intended in v5.