You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Android and iOS the focal (for pinch) and anchor (for rotation) points are always in the coordinate space of the view, while on web they are not. It looks like they are in the window coordinate space, though I didn't investigate it that thoroughly.
The above snippet will render a red point at the relevant point (replace pinch/rotation in detector prop to see the other gesture). It should only change based on the position of the pointer relevant to the blue square, but it's also dependent on its position on the screen and that causes it to move outside the view.
## Description
Fixing #2929 required adding additional information to `TrackerElement`. If we were to leave current structure of `PointerTracker`, we would have to add few more methods. After refactoring, there are only 2 that were not present before:
- `getLastViewRelativeCoords`
- `getViewRelativeCoordsSum`
I'd like to make similar changes to our handlers in the future (i.e. use `coords` object instead of `lastX` and `lastY` variables).
## Test plan
Tested on example app.
Description
On Android and iOS the focal (for pinch) and anchor (for rotation) points are always in the coordinate space of the view, while on web they are not. It looks like they are in the window coordinate space, though I didn't investigate it that thoroughly.
Untitled.mov
Steps to reproduce
The above snippet will render a red point at the relevant point (replace pinch/rotation in detector prop to see the other gesture). It should only change based on the position of the pointer relevant to the blue square, but it's also dependent on its position on the screen and that causes it to move outside the view.
Snack or a link to a repository
https://github.com/software-mansion/react-native-gesture-handler ❤️
Gesture Handler version
main
branchReact Native version
0.74.1
Platforms
Web
JavaScript runtime
None
Workflow
Expo managed workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: