Replies: 1 comment
|
What you want is usually implemented as a direction lock:
With RNGH, the first tools to try are Example idea: const horizontal = Gesture.Pan()
.activeOffsetX([-10, 10])
.failOffsetY([-20, 20]);
const vertical = Gesture.Pan()
.activeOffsetY([-10, 10])
.failOffsetX([-20, 20]);That is not a perfect “20 degree” API, but it gets you close by encoding the ratio as X/Y thresholds. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Two nested scroll views - vertical inside horizontal.
Requirement: Vertical should be always enabled, but if gesture goes 20 degree to horizontal axe for some distance (e.g. 10 pixels) than we should enable horizontal scroll and disable vertical.
So basically we are trying to configure the angle at which horizontal gesture should have higher priority than vertical.
We tried making pan gesture handler and enable/disable
scrollEnabledwith reanimated.Any ideas how to implement that? Thank you!
Similar question: #2978
All reactions