react-native-image-slider-box icon indicating copy to clipboard operation
react-native-image-slider-box copied to clipboard

Circle Loop Bug

Open lirda394 opened this issue 2 years ago • 6 comments

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): <View style = {styles.banner}> <SliderBox images={images} onCurrentImagePressed={() => navigation.navigate("SeriesPage")} autoplay={true} autoplayInterval={1000} circleLoop/>
</View>

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", ]

lirda394 avatar Feb 16 '23 20:02 lirda394

I'm facing the same issue.

adey69 avatar Feb 17 '23 10:02 adey69

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

philemonpeter02 avatar Jun 12 '23 12:06 philemonpeter02

same issue

VikramSingh45 avatar Jun 20 '23 07:06 VikramSingh45

having same issue here too, anyone found solution?

warrence avatar Jul 17 '23 16:07 warrence

@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

adey69 avatar Jul 20 '23 08:07 adey69

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

I solve it here

YankovWeb avatar Mar 22 '24 23:03 YankovWeb