intellidev1991 / react-native-image-slider-box

A simple and fully customizable React Native component that implements an Image Slider UI.
MIT License
284 stars 100 forks source link

Circle Loop Bug #168

Open lirda394 opened 1 year ago

lirda394 commented 1 year ago

Hello, I have been trying to implement the circleloop prop and I have been getting some weird results. I put a link to the screen recording that captures the issue. The issue is that once the slider gets to the last image it slides left to the first image then it snaps back all the way to the right.

I don't want the left image to show and I have seen people demoing the slider and they do not have this problem.

Screen Recording- https://user-images.githubusercontent.com/17896518/219474921-a452f169-369e-4f5d-999a-eaa76d0623e3.mov

Slider Code(within a safeareaview):

navigation.navigate("SeriesPage")} autoplay={true} autoplayInterval={1000} circleLoop/>

styles.banner: banner: { marginBottom: 10 }

Images Code: const images = [ "https://storageconverge.blob.core.windows.net/pictures/jay-mantri-TFyi0QOx08c-unsplash.jpg", "https://storageconverge.blob.core.windows.net/pictures/eberhard-grossgasteiger-y2azHvupCVo-unsplash.jpg", "https://storageconverge.blob.core.windows.net/pictures/qingbao-meng-01_igFr7hd4-unsplash.jpg", ]

adey69 commented 1 year ago

I'm facing the same issue.

philemonpeter02 commented 1 year ago

facing same issue the slider scrolls back to the first instead of playing the first directly

VikramSingh45 commented 1 year ago

same issue

warrence commented 1 year ago

having same issue here too, anyone found solution?

adey69 commented 1 year ago

@warrence I couldn't find the exact issue but I believe it had something to do with scroll animation. I fixed it by creating a patch for the package which disables the animation prop of the scroll function. Following is a repo with minimal code with the bug fix: https://github.com/adey69/react-native-slider-fix Following is the link to the patch I created: https://github.com/adey69/react-native-slider-fix/blob/main/patches/react-native-image-slider-box%2B2.0.7.patch

Preview after the fix:

https://github.com/intellidev1991/react-native-image-slider-box/assets/53408840/7f6e1b8d-1cf8-49e5-8bea-190ea0d18994

YankovWeb commented 6 months ago

https://github.com/intellidev1991/react-native-image-slider-box/issues/187

I solve it here