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

How to make it work when starting touch on the child views?

Open eljago opened this issue 9 years ago • 2 comments

I noticed that when starting the touch on a child view, the gestures doesn't work. In the example if I touch one of the Text views and try to drag, the GestureView won't move.

How could I make it ignore the child views?

eljago avatar Dec 23 '15 07:12 eljago

I was having this problem as well and found this helpful answer on stackoverflow.

Basically you just say pointerEvents="none" on the thingy you want to ignore.

<GestureView
  ...(gestureview props)...
>
  <View pointerEvents="none">
    <Text>Heyyy</Text>
    <Text>Heyyy</Text>
  </View>
</GestureView>

futurepaul avatar Mar 14 '16 22:03 futurepaul

How do I wrap the Gesture view around an image?

<GestureView ...gestureProps...>
  <Image source={{uri: uri}} />
</GestureView>

The above doesn't seem to work...Any ideas?

I created a pull request for the above. #13

sscaff1 avatar Mar 16 '16 19:03 sscaff1