software-mansion / react-native-gesture-handler

Declarative API exposing platform native touch and gesture system to React Native.
https://docs.swmansion.com/react-native-gesture-handler/
MIT License
6.13k stars 982 forks source link

onTouchesMove reports invalid absolute position values during pinch gesture #3073

Closed Glazzes closed 2 months ago

Glazzes commented 2 months ago

Description

Hi there and thank you all for your open source efforts, I'm currently creating a zoomable image component and in order to achieve this behavior I need the absolute position (absoluteX and absoluteY values) of both fingers on the screen, however I'm getting the following issues.

I can not tell whether this problem happens on iOS as I don't own an Apple device.

Steps to reproduce

Snack or a link to a repository

https://snack.expo.dev/@glazzes/d545df

Gesture Handler version

2.16.1

React Native version

0.74.1

Platforms

Android

JavaScript runtime

Hermes

Workflow

Expo managed workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

Real device

Device model

Alcatel 5044R (Android 7)

Acknowledgements

Yes

Glazzes commented 2 months ago

I'd like to add something to this issue after some testing from my part, scaling the item affects the values reported as already mentioned however modifying width and height properties reports correct values.

coado commented 2 months ago

I'd like to add something to this issue after some testing from my part, scaling the item affects the values reported as already mentioned however modifying width and height properties reports correct values.

Hey, thanks for your report. I've pushed the code that should fix the issue.

Glazzes commented 2 months ago

@coado Thank you for your work, I wonder, was this an Android only issue? As I mentioned I don't have an iPhone.

coado commented 2 months ago

@coado Thank you for your work, I wonder, was this an Android only issue? As I mentioned I don't have an iPhone.

Yes, that was something specific to android implementation. The iOS handles that out of the box.