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 final scale value to onPinchEnd callback #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mccahan
Copy link

@mccahan mccahan commented Mar 24, 2024

Motivation

I have ImageZoom elements within an existing carousel, and I need to disable the carousel's gesture handlers when the image is zoomed in. There does not seem to be an easy way, currently, to get the current scale for the image. With the existing callback, if you use event.scale, it may return a value less than 1 because it returns the result of the gesture and not what the clamped value is.

My guess at a fix (testing locally, I have another branch locally anyway to use Expo Image) is to add the scale as an argument to the onPinchEnd callback with the actual rendered scale.

(Also v3 could not have come at a better time, love it)

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.

None yet

1 participant