react-native-basic-carousel icon indicating copy to clipboard operation
react-native-basic-carousel copied to clipboard

Multiple skips in the snap scroll

Open Ali72 opened this issue 1 year ago • 5 comments

Firstly, thank you for your handy module—it's been really helpful. However, I've noticed a problem. When I set the width to match the screen and then drag from one side to the other, it seems to jump two steps instead of just one in snap mode. Also, the "getCurrentIndex" function gets called several times with the same value.

Additionally, I'd like to request a feature where I can adjust the duration of the snap animation.

Ali72 avatar May 04 '24 09:05 Ali72

Hi @Ali72, thank you for your kind words, I'm glad it's been helpful to you.

I'd take a look at the issue and get back to you on it.

macvish avatar May 04 '24 11:05 macvish

Hi @Ali72, is this what you used for the width? const { width } = Dimensions.get('screen') or const { width } = Dimensions.get('window')

Also, is this happening on both ios and android?

macvish avatar May 04 '24 11:05 macvish

Hi @Ali72, is this what you used for the width? const { width } = Dimensions.get('screen') or const { width } = Dimensions.get('screen')

Also, is this happening on both ios and android?

I used const dim = Dimensions.get('window'); and tested it only on Android phones and tablets. But on tablets, it's 300 pixels less because of the drawer static width.

Ali72 avatar May 04 '24 12:05 Ali72

I'm currently not experiencing this issue on android, what version using the most recent version 1.1.2

As for the feature to adjust the duration of the snap animation, that is currently available for autoplay, known as autoplayDelay

macvish avatar May 04 '24 12:05 macvish

As for the feature to adjust the duration of the snap animation, that is currently available for autoplay, known as autoplayDelay

I meant the animation speed from when the finger is lifted until the snap is finished. (do snap action faster or slower)

Ali72 avatar May 09 '24 19:05 Ali72