You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
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
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
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 tousePageGesture
hook should prevent detection of the orientation that is not specified. I.e. ifhorizontal
is specified only that direction should be detected.Actual Result
It looks like
usePageGesture
hook already accepts an options object withorientation
prop on it, but it doesn't seem to have any affect at the moment.The text was updated successfully, but these errors were encountered: