Skip to content
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

feat(core): swiping in rewind mode #5422

Merged
merged 6 commits into from Feb 10, 2022

Conversation

vltansky
Copy link
Collaborator

@vltansky vltansky commented Feb 2, 2022

closes #5361

not sure if the new parameter is needed or it just should work this way always in rewind mode.

@nolimits4web
Copy link
Owner

Look at how it works in issue's Glide example link, it does rewind during swipe not on release, so it should happen within onTouchMove handler

@vltansky
Copy link
Collaborator Author

vltansky commented Feb 3, 2022

Ok, will refactor it.
But should it be a parameter?
I think no..

@vltansky vltansky changed the title feat(core): rewindOnSwipe feat(core): swipe in rewind mode Feb 7, 2022
@vltansky vltansky changed the title feat(core): swipe in rewind mode feat(core): swiping in rewind mode Feb 7, 2022
@nolimits4web
Copy link
Owner

It should consider touch direction and swipe ratio/duration. To avoid such cases:

2022-02-07.16.47.37.mov

On first slide it should rewind to last on swipe if:

  • swipe direction is prev + touch duration is more than params.longSwipesMs + swipe ratio >= params.longSwipesRatio
  • swipe direction is prev + touch duration is less than params.longSwipesMs

same for rewind on last slide

@vltansky
Copy link
Collaborator Author

vltansky commented Feb 7, 2022

How about this approach ?

@nolimits4web
Copy link
Owner

Nothing changed as I see:

2022-02-10.11.57.21.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"RewindOnSwipe" option
2 participants