Proxy or simulate gesture to sibling elements #500
Unanswered
devinhalladay
asked this question in
Q&A
Replies: 1 comment 3 replies
-
For further reference, my end goal is to recreate something similar to this interaction from the app Liquid Text: |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Thanks for this awesome library, it seems way more user friendly than some of the alternatives!
I'm building an interaction — a PDF reader — that uses
usePinch()
to allow users to shrink their pages into a stack. The interaction would look something like this:At the moment, this code obviously binds the pinch gesture to each element individually, so I can pinch on one and it will translate up.
What I'd like to achieve, as shown in the animation above, is to somehow share state between all
Page
s, such that pinching any givenPage
will trigger a translation on all other subsequentPage
s.How would I go about achieving this? Please let me know if I can make the question more clear!
Beta Was this translation helpful? Give feedback.
All reactions