Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[useGesture] add option to disable horizontal or vertical gesture detection #35

Open
aamorozov opened this issue Oct 18, 2019 · 0 comments
Labels
Type: Bug Something isn't working

Comments

@aamorozov
Copy link
Contributor

Description

Currently the hook tries to detect the gesture in both directions, which causes the issues with the carousels that need to be swiped only left to right/right to left.

Steps to Reproduce

Can be replicated here:
https://hz-core.netlify.com/use-page-gesture#example
Or here:
https://2u.netlify.com/components/carousel

Expected Result

orientation prop on the options object that is being passed to usePageGesture hook should prevent detection of the orientation that is not specified. I.e. if horizontal is specified only that direction should be detected.

Actual Result

It looks like usePageGesture hook already accepts an options object with orientation prop on it, but it doesn't seem to have any affect at the moment.

@aamorozov aamorozov added the Type: Bug Something isn't working label Oct 18, 2019
@aamorozov aamorozov changed the title useGesture | add option to disable horizontal or vertical gesture detection [useGesture] | add option to disable horizontal or vertical gesture detection Oct 18, 2019
@aamorozov aamorozov changed the title [useGesture] | add option to disable horizontal or vertical gesture detection [useGesture] add option to disable horizontal or vertical gesture detection Oct 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant