-
-
Notifications
You must be signed in to change notification settings - Fork 995
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 velocity information on macOS #2695
Labels
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
Hey! 👋 It looks like you've omitted a few important sections from the issue template. Please complete Steps to reproduce, Snack or a link to a repository, Gesture Handler version and React Native version sections. |
jfedak
added a commit
that referenced
this issue
Feb 8, 2024
## Description <!-- Description and motivation for this PR. Include 'Fixes #<number>' if this is fixing some issue. --> Fixes #2695 This PR adds pinch and rotation velocity information on macOS. In order to make it work, we needed to change a way of handling events inside `RNRotationHandler` and `RNPinchHandler` - from now on, it uses `rotateWithEvent` and `magnifyWithEvent` respectively. The action is based on the state of handler. Both handlers calculate current velocity in a similar way to [Android handler](https://github.com/software-mansion/react-native-gesture-handler/blob/83d8e7b02b525a8a5d18dc0eb680565470daa92d/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt#L27-L30). ## Test plan <!-- Describe how did you test this change here. --> PR was tested on `Pinch & rotate` example.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
RIght now, we don't provide any information about velocity of rotation and pinch gestures on macOS, since there is no information about it in NSRotationGestureRecognizer. It still seems that we can get this information like on Android.
Steps to reproduce
Snack or a link to a repository
Gesture Handler version
React Native version
Platforms
iOS
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: