-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ touch idea ] disabling horizontal frame movement when scrolling vertically #119
Comments
Deleting line 133 stopped the unwanted behavior when scrolling vertically on a mobile device. It would be nice to set this as a Carousel attribute. |
Use |
My problem is that the carousel is too sensitive. If the user wants to scroll down not to look at carousel part, it also moves horizontally. By deleting the line it doesn't move the frames instantly. I'll add 2 gifs to explain visually. |
Thanks @victorbyttebier! I think it's a regression, will check on this later. |
is this being investigated? mind if i give it a look? |
That would be nice! @lluisrojass |
@illuisrojass have you found something? |
@besserwisser @amio @victorbyttebier The bug is caused because we are using PageY/PageX to calculate deltas. The scenario is that a user begins scrolling down the page vertically, and because the page scrolls, our deltaY remains constant (+/- 10 px) as the page scrolls. It doesn't take much for the deltaX to overtake deltaY here and commence scrolling of the carousel (you can see this happen in the GIF submitted by @victorbyttebier above). At this point you start getting nasty errors in your console because we are attempting to cancel an un-cancellable event. We should be using Even after making the necessary changes there is still a scenario where a user's touch movement triggers later carousel movement which makes for some jagged UI (when deltaX overtakes deltaY). other patterns of movement cause even more intrusive issues We need some way to identify a touch should be ignored, i think the best way to do it is to calculate the angle on the first touchMove. we can do this easily via would a change like this be considered breaking? |
👍 Great point, we should use
Usually it's a very small amount movement in first touchMove event. Not sure if we can guess user's intentional movement correctly at that moment. |
@amio with angles we can derive intent without caring about the magnitude of the x/y values. |
+1 on angle. Currently we are guessing intent by angle, continuously. I was thinking if we should identify a touch should be ignored on first move. |
Hello!
If a user scrolls vertically on a touch device, it would be nice to disable the active carousel frame by only allowing horizontal scrolling if demanded. I think changing to the next frame if the horizontal touchevent ended, could be useful and leaves that unwanted behavior.
Kudos for the library
The text was updated successfully, but these errors were encountered: