alexbrillant / react-native-deck-swiper

tinder like react-native deck swiper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Issues when using a draggable object on a card

hejhog13 opened this issue · comments

commented

I am trying to use a component that is draggable on my cards. Obviously, due to both the deck and the component reading swipes and drags there are issues. I am considering one of these three workarounds but can't figure out how to make them work. Could anybody help?

  1. All swipes/drags are registered to the card unless the swipe/drag is done on the draggable object (i.e. the draggable object takes precedence). I'm not sure how possible this would be.
  2. Decreasing the swipe "hit box" on the card. Is there a way to only make the top half of the card swipable so then then draggable object can be in the bottom half?
  3. Turning off all swiping and using a button to go to the next card. I think this is a reasonable option as well, but the card messes with the draggability of the object still. Is there a way to turn off the cards panResponder?

Any help would be very appreciated!

commented

Another thought: is there a way to disable the PanHandler until a certain button is pressed? And then swiping would work again after that?