React-native-deck-swiper: a strange issue

Created on 16 May 2017  路  20Comments  路  Source: alexbrillant/react-native-deck-swiper

it causes a issue when i move the object , release ,and click the object quickly,
the object will stay an incorrect positon
such as :
20170516172246

bug

All 20 comments

By the way , Thank you for the nice comonpent

Can move right it increases and move left it decreases?

Are you using the latest version of RN? I cannot reproduce with react-native v0.43.3.

I have seen this issue before with a previous version of RN, but I can't remember which one it is.

@alexbrillant RN 0.44

@lzctbyong Does this bug occur only on android?

@alexbrillant My Platform is Android, I didn't test IOS ,I guess it's an issue about PanResponder
Do you have this issue?

@lzctbyong Are you using the latest version of this package (1.1.6) ?

@lzctbyong I haven't tested it on 0.44 yet, and I cannot reproduce the bug on my current test project. I will try to find time today to test it. I think that using updateNativeStyles() instead of Animated.Event could do the trick. This is what they use in the example. A pull request would be cool. https://facebook.github.io/react-native/docs/panresponder.html

@alexbrillant it's latest (1.1.6), I try to find more information about the issue for you

@alexbrillant I find the code for the issue:

onPanResponderGrant = ( event , gestureState ) => { console.log('Swiper(93):::onPanResponderGrant---->',) this.state.pan.setOffset( { x: this._animatedValueX , y: this._animatedValueY } ) this.state.pan.setValue( { x: 0 , y: 0 } ) }

if the code likes this ,it would be OK
this.state.pan.setOffset( { x: this._animatedValueX , y: this._animatedValueY } )
==>
this.state.pan.setOffset( { x: 0, y: 0 } )

What do you think about it ??

@lzctbyong thanks for the help. if you want to be a contributor, you can fork my repo, and submit a pull request. Otherwise, I will test it out tonight, and publish it if it works

Cannot reproduce in ios

@alexbrillant So Funny , I would test the iOS Platform when I'm free

@lzctbyong Cannot reproduce on android either.

Ohh, I get it now. You have to tap really quick on the element while it is being swiped haha. Okey, I think I know how to fix this !

@alexbrillant Right! you found it finally

Thanks ! I'm sorry I couldn't understand your issue before :p

My English is poor , so that I can't describe the details too much .
It's not your problem ,You can close the issue after you fix it .

@lzctbyong fixed in v1.1.7 ! 馃憤

Was this page helpful?
0 / 5 - 0 ratings