Issues with PanGestureHandler and Animated Style #2075
Unanswered
hashedname
asked this question in
Q&A
Replies: 0 comments
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.
-
I'm building a draggable flat list with fixed height items: here is a snack.
Basically when the user drags the handle of an item I find which item was dragged and then I render a copy of the item with an absolute position. The problem is that when the user taps and holds the handle of an item the state changes to
BEGAN
, but the absolute positioned item is placed at the wrong position, while if the user moves it and the state changes toACTIVE
it is positioned correctly and moves along with the gesture of the user. I placed some logs and I can't see odd values except for theonLayout
event which actually prints 0 when the state changes toBEGAN
(note that it would actually be placed at a negative y position if it wasn't for theMath.max
boundary when computing the animated style).Am I missing something?
video.mp4
EDIT:
I opened an issue #2078 with a simpler snack: https://snack.expo.io/sLXZ7Y8OO.
Can anyone help with this, please? Is this a bug or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions