Skip to content

New finalScalePosition Param #86

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

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

Conversation

LiamBateman
Copy link

When we use the onPinchEnd event as so:

onPinchEnd={(e) => console.log('onPinchEnd', e)}

It returns only the scale change, not the new scale. I propose to include another parameter which returns the current scale as well.

This is super useful for matching other UI elements that may need to move in time with the image being scaled.

I've proposed the name 'finalScalePosition'.

(#83)

Copy link
Owner

@likashefqet likashefqet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks fine, although I would suggest passing an animated scale value as a prop to the ImageZoom/Zoomable component for smoother animations that update in real time instead of waiting for the gesture to end. This value will reflect the component’s current scale and can be used to drive animations of other elements seamlessly during gestures.

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