Getting Gesture To Work with Swiping Up and Down

using the new gesture api and for some reason movements left to right are passed down to my gesture, but up and down movements are captured by the IonCard?

if someone has a quick suggestion please help? otherwise i will strip down my app an post the sample code.

Do you have sample code that you could share?

working on it right now

you will see that when you swipe up notCaptured is callback is triggered, but when I swipe left or right, the onMove and onStart callbacks are triggered @mhartington

Closing… I didn’t read the documentation thoroughly

direction 'x' | 'y' | undefined 'x' Limit gesture detection to movements along a certain axis.

2 Likes

Was just going to post this :smile:

  useEffect(() => {
    let cards = Array.from(document.querySelectorAll(".swipeCard"));
    cards.forEach(c => {
      const gesture = createGesture({
        el: c,
        direction: 'xy',
        disableScroll: true,
        gestureName: "my-swipe",
        
        onStart: event => {
          console.log("onStart", event);
        },
        onMove: event => {
          console.log("detltaY", event.deltaY);
          
        }
      });
      gesture.enable(true);
    });
  }, []);```
1 Like

thanks and sorry for distraction, will be better at RTFM :rofl:

1 Like