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

Add prop to prevent moving child out of bounds while zooming #72

Merged
merged 2 commits into from
May 15, 2023

Conversation

tf
Copy link
Contributor

@tf tf commented May 15, 2023

While dragging it is not possible to move the image to an "insane" offset (since _sanitizeOffset is called in _handleDrag). This prop ensures that it's also not possible to move the image out of bounds with a pinch gesture.

Without prop:

screen-20230515-130244_3.mp4

With prop:

screen-20230515-125530_3.mp4

tf added 2 commits May 15, 2023 11:54
While dragging it is not possible to move the image to an "insane"
offset (since `_sanitizeOffset` is called in `_handleDrag`). This
prop ensures that it's also not possible to move the image out of
bounds with a pinch gesture.
ghost

This comment was marked as resolved.

@retyui retyui merged commit 8bc1bfb into retyui:master May 15, 2023
@tf tf deleted the enforce-bounds-during-zoom branch May 15, 2023 11:59
@retyui
Copy link
Owner

retyui commented May 15, 2023

Released 4.7.0

diff: 4.6.0...4.7.0

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.

2 participants