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

Detect when user is panning past the bounds of the zoom container #89

Open
sgrund14 opened this issue Sep 24, 2024 · 0 comments
Open

Detect when user is panning past the bounds of the zoom container #89

sgrund14 opened this issue Sep 24, 2024 · 0 comments

Comments

@sgrund14
Copy link

sgrund14 commented Sep 24, 2024

Hello!

How would you recommend detecting when an image is zoomed in and the user pans all the way to the bounds of the zoom container?

I'm using this in a carousel, and trying to achieve this effect:

  • When zoomed on an image, and the user pans to the right/left to the very edge of the container
  • Once the edge is hit, if you continue to drag in the direction of the edge, it navigates to the next image in the carousel
  • If you navigate in the opposite direction, it allows the drag as normal

Seems like this would require:

  • Knowing when you are at the edge of a zoom container
  • Being able to prevent drag in a certain direction and defer it to the wrapping carousel

Any pointers appreciated!

Thanks

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

No branches or pull requests

1 participant