Skip to content
This repository has been archived by the owner on Sep 13, 2020. It is now read-only.

How to deal with another pan responder inside <ContentView /> #94

Closed
michaltaberski opened this issue Sep 2, 2015 · 7 comments
Closed

Comments

@michaltaberski
Copy link

Hello,

I would like to ask for advise how to deal with second pan responder I need to use inside ContentView?

I would like to keep nice pannable/swipeable character of the menu, but inside Content View I still need to have pan responder gestures.

The final resoult I would like to achive is:

ip

How should I approach it?

// EDIT

or even nicer solution would be to have:

ip2

@Kureev
Copy link
Owner

Kureev commented Sep 3, 2015

I think both of those behaviors are possible with this plugin. Do you have any error when you try to implement it?

@michaltaberski
Copy link
Author

So my idea was to merge both functionalities:

  1. the side menu
  2. this tinder like animation
    https://github.com/brentvatne/react-native-animated-demo-tinder

In the end what I got is:
http://screencast.com/t/0zU3s82piuq

It looks like the gestures are interfering each other, so I would like to know if there is a pattern to solve this kind of issues.

@Kureev
Copy link
Owner

Kureev commented Sep 3, 2015

I think if I would expose onStartShouldSetResponderCapture it'll solve the issue, right? You would be able to specify custom function and ignore your panResponder gestures. Am I right?

@michaltaberski
Copy link
Author

I think it might help.

The solution I'm thinking about is following:

I could write custom onStartShouldSetResponderCapture function, where I check if the swipe starts on another component with panResponder (return false), or if it starts just on background (return true)

Does it make sense for you?

@Kureev
Copy link
Owner

Kureev commented Sep 3, 2015

That's exactly what I mean in the comment above :) I consider this as a good improvement, will try to implement it ASAP

@michaltaberski
Copy link
Author

Awesome, thx.

@Kureev
Copy link
Owner

Kureev commented Sep 4, 2015

Exposed in 0.13.0

@Kureev Kureev closed this as completed Sep 4, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants