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

Access locations of gesture touches #221

Closed
cwhenderson20 opened this issue Jun 22, 2018 · 5 comments
Closed

Access locations of gesture touches #221

cwhenderson20 opened this issue Jun 22, 2018 · 5 comments

Comments

@cwhenderson20
Copy link

cwhenderson20 commented Jun 22, 2018

Thanks for the great library!

I'm looking to create a system in which one gesture handler (rotation/pinch) might apply its effects to one of a few different animated views nested within it. In order to figure out which layer to affect, I'll need to access the locations of the individual touches that comprise the gesture. Unfortunately, the focalX/Y and anchorX/Y don't provide enough info for my purposes.

PanResponder from React Native exposes this feature natively, but I'd much prefer to use this declarative library.

It might look something like this:

{
  nativeEvent: {
    // ...
    touches: [{
      x: 123,
      y: 456
    }]
  }
}

But ultimately, the format isn't important — as long as it's possible to access the location (and maybe other properties) of each touch on both the state change and handler events.

@osdnk
Copy link
Contributor

osdnk commented Jun 22, 2018

Hi, @cwhenderson20
Thank you for this suggestion as it might be a nice feature to be implemented.
I think we'll take a look on it but I cannot predict when it could happen as we have another important targets now

@clintdoriot
Copy link

clintdoriot commented Sep 26, 2018

+1 for this feature, but for a different use case. I'm having trouble combining Pinch and 2 finger Pan handlers (read the docs, tried the demo, still having issues). With some of this raw data it should be possible for me to use the PanGestureHandler to account for both pan and pinch.

@jakub-gonet jakub-gonet changed the title [Feature Request] Access locations of gesture touches Access locations of gesture touches Sep 8, 2020
@Noitidart
Copy link

Noitidart commented Aug 27, 2021

Are there any solutions to this? Possible using two pan gesture handlers? I tried but could not figure it out #1602

@j-piasecki
Copy link
Member

Hi! I believe that touch events introduced in Gesture Handler 2 are fulfilling the use case you have described so I'll close the issue.

@Noitidart
Copy link

Oh thank you I will try that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants