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
I've written the following for debugging and attempt at correction. I observed that during quick swiping horizontally through my 10 horizontal child Scrollviews under react-native-swiper during heavy cpu use (rendering in said child Scrollviews), oftentimes index would go off the rails and be wrong.
My debugging code:
const onMomentumScrollEnd = (e, state, context) => {
let index = Math.round(state.index)
let offsetIndex = Math.round(state.offset.x / Dimensions.get('window').width - 1)
if (index != offsetIndex) {
console.log(`>>> Swiper.onMomentumScrollEnd offsetIndex ${offsetIndex} doesn't agree with index ${index}:`, state, context)
index = offsetIndex
}
}
index, when wrong, would always be smaller than it should be. offsetIndex would always be correct, corresponding to the correct Scrollview with data displayed within for that actual index.
This is obviously a problem as a wrong index loses the correct placement of child Scrollviews, and wrong display of the pager dots.
The text was updated successfully, but these errors were encountered:
I've written the following for debugging and attempt at correction. I observed that during quick swiping horizontally through my 10 horizontal child Scrollviews under react-native-swiper during heavy cpu use (rendering in said child Scrollviews), oftentimes index would go off the rails and be wrong.
My debugging code:
index, when wrong, would always be smaller than it should be. offsetIndex would always be correct, corresponding to the correct Scrollview with data displayed within for that actual index.
This is obviously a problem as a wrong index loses the correct placement of child Scrollviews, and wrong display of the pager dots.
The text was updated successfully, but these errors were encountered: