Closed pontusab closed 6 years ago
As far as I am concerned this https://github.com/kmagiera/react-native-gesture-handler/issues/229 issue is related
Hi, @pontusab Do you observe it on both platform?
@osdnk Yes, both iOS and Android.
I believe I am encountering the same issue on Android, I'm using ClojureScript and Expo. I could attach the source if it'd help. I imagine the generated JS wouldn't be very useful but if is I can attach it as well.
Never mind. Turns out I wasn't accessing the component state properly. :roll_eyes:
Hello this happened to me also so what I did is I don't use setOffset
Offset somehow doesn't work right when used togehter with Animated.timing
so what I did I defined a separate Animated.Value
to be used as gestureOffset
which is then added to the gesturePosition
using Animated.add
For example:
const transform = [{ translateX: Animated.add(gesturePosition.x, gestureOffset.x), }, { translateY: Animated.add(gesturePosition.y, gestureOffset.y), }, { scale }]
This workaround works, but I think it is worth looking at Native code to see where is the issue. Hope this will help.
@tomasgcs Do you have an example you can share?
Yep, @tomasgcs idea worked! Thanks
Hey thanks for this nice library!
Im trying to make a instagram pinch and zoom image, I have a working zoomable and movable image, but i struggle with the release phase, when i just pinch on release the image is way of the position so it "jumps" at start.
onGestureMove
works it updates the position correct, but then when i doonGestureRelease
the animated value ofgesturePosition.x
andgesturePosition.y
is wrong.Would love some help on this 💯
Element.js
Selected.js