You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the package before we were generally using an array of images with length less than 5.
But since we start to use more images we found that the position count would not increase when the next image was scrolled too, but would continue again after that. So far we've seen this at position 6 and 17 and I am pretty stumped as too why.
We aren't calculating anything to do with the position on our end and looking through some of the code I can't see as to why it would stop at certain steps.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
DanNeenan
changed the title
Custom button position returns an incorrect position
Button position returns an incorrect position
Nov 29, 2018
Turns out the issue was being caused by adjusting the image width with the padding that we need to get the images to sit properly in the slideshow.
The images loop through correctly when doing it manually, but with the extra padding, the position is being returned incorrectly.
If auto play is set and loops through the images that way, it now ignores the padding and we get the same issue as many other users have had, but the position is returned correctly.
I believe the issue is being cause on line 151
if (position !== -1 && position !== images.length) {
newPosition = Math.round(event.nativeEvent.contentOffset.x / width);
this.setState({ position: newPosition });
}
I believe the _getPosition() functions returns it correctly from it's position in the array, why is it then being updated by where it is on the screen?
When using the package before we were generally using an array of images with length less than 5.
But since we start to use more images we found that the position count would not increase when the next image was scrolled too, but would continue again after that. So far we've seen this at position 6 and 17 and I am pretty stumped as too why.
We aren't calculating anything to do with the position on our end and looking through some of the code I can't see as to why it would stop at certain steps.
Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: