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

PanResponder.onPanResponderMove not responding for pinch #8

Closed
weixingsun opened this issue Jul 22, 2016 · 7 comments
Closed

PanResponder.onPanResponderMove not responding for pinch #8

weixingsun opened this issue Jul 22, 2016 · 7 comments

Comments

@weixingsun
Copy link

Hello, @Stoffern

I cannot get event that more than 2 touches in my app using RN0.29

PanResponder.create({
onPanResponderMove: (evt, gestureState){
if(evt.nativeEvent.touches.length<2) //move
//if(evt.nativeEvent.changedTouches.length<2) //also move?
else //pinch, this condition is never called.
}
...
})
//Is PanResponder changing the API ?
thanks very much!

@st0ffern
Copy link
Owner

st0ffern commented Aug 8, 2016

@weixingsun please provide more details, ios, android, code +
It should all work on RN 0.29

@st0ffern
Copy link
Owner

@weixingsun did you solve this?

@weixingsun
Copy link
Author

@Stoffern sorry for late, I cannot make it works on both Android 6.0.1/iOS 9.3.3 device with my RN.29, which is very annoying. I have tried to clean node_modules folder and re-install with no luck.
When doing some debugging, in PanResponder.onPanResponderMove function, evt.nativeEvent.touches never greater than 1.
Could you please share a working example code for pinching with PanResponder, I am very new to this function, thank you so much.

@weixingsun
Copy link
Author

@st0ffern
Copy link
Owner

@weixingsun this is not related to this repo as you are creating your own.
This would normally be a react-native question.

The answer is that you are using:
evt.nativeEvent.touches only main finger.
you should use:
evt.nativeEvent.changedTouches as this will register changes on the touch, when you use two fingers.

closing this as it is not related to the repo

@slorber
Copy link

slorber commented Jul 10, 2017

@Stoffern are you sure this solution really works? move event is not triggered for me whenever the panResponder has 2 fingers

https://react-native.canny.io/feature-requests/p/panresponderonpanrespondermove-not-responding-for-pinch

@Ovi
Copy link

Ovi commented Apr 22, 2019

It didn't work for me either. Any news on this yet?

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

No branches or pull requests

4 participants