Skip to content

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

@TPME

Description

@TPME

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions