react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Returning control of parent pan responder to a child.

Open wgormley opened this issue 10 years ago • 3 comments

I have a gallery type app that I am working on, but can't seem to get this last piece. I have a parent view that deals with moving through the images, and the image view that allows a user to pan around the image when zoomed in. If a user is at the edge on an image, the scrolling gesture will allow the next image to start coming in. This i can do fine, just passing control of the panresponder to the parent when the edge is hit. but i would like to let the user reverse this without having to life their finger. the user should be able to change their gesture direction, moving the new image back off the screen and allowing the image to be panned again. so effectively i need to pass the control of the panresponder back to the child. i cant seem to find a way to do this. once the child allows control to bubble up (by returning true from the onPanResponderTerminationRequest) it will never get access again until a new touch is initiated. is this possible?

wgormley avatar Feb 18 '16 21:02 wgormley

Hey @wgormley, I'm not very familiar with the Pan Responder unfortunately but would like to ask a meta question:

I've added the Issue template and hoping it would make it clear it's best to ask on StackOverflow first before filing a bug on GitHub.

I'd like to ask: is that description clear enough? What did you think when you saw it? Was it too long for example?

mkonicek avatar Feb 18 '16 22:02 mkonicek

@mkonicek probably should have posted it on stackoverflow first, just been in the habit of looking on github first with react native stuff. the description was good.

wgormley avatar Feb 18 '16 22:02 wgormley

OK thank you @wgormley. I'll close this issue as it should be posted on StackOverflow.

mkonicek avatar Feb 21 '16 18:02 mkonicek