use-gesture icon indicating copy to clipboard operation
use-gesture copied to clipboard

state swipe is -1 for both axes even with axis restricted to y

Open TPME opened this issue 1 year ago • 0 comments

Hi, I am using the following:

useGesture(
        {
            onDrag: (state) => handleDrag(state),
        },
        {
            drag: {
                swipe: { distance: 3, velocity: [0.2, 0.2], duration: 400 },
                axis: 'y',
            },
        }
    );

Now, there is a bug where the state.swipe[0] and state.swipe[1] is equal to -1 simultaneously! If I understood axis setting correctly, this should not happen.

TPME avatar Jul 12 '24 15:07 TPME