@codeleap/mobile 3.15.5 → 3.15.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codeleap/mobile",
3
- "version": "3.15.5",
3
+ "version": "3.15.6",
4
4
  "main": "src/index.ts",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {
@@ -130,7 +130,7 @@ export const Pager = (pagerProps: PagerProps) => {
130
130
  const handleScrollEnd = useCallback(
131
131
  (event: ScrollEvent) => {
132
132
  const x = event?.nativeEvent.contentOffset.x
133
- const toPage = Math.ceil(x / width)
133
+ const toPage = Math.floor(((Math.round(x)) / Math.round(width)))
134
134
 
135
135
  if (toPage !== page && toPage <= childArr.length - 1) {
136
136
  setPage(toPage)