@prose-reader/core 1.198.0 → 1.199.0
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/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +3 -3
package/dist/index.umd.cjs
CHANGED
|
@@ -5528,7 +5528,7 @@
|
|
|
5528
5528
|
}
|
|
5529
5529
|
const getItemOffsetFromPageIndex = (pageWidth, pageIndex, itemWidth) => {
|
|
5530
5530
|
const lastPageOffset = itemWidth - pageWidth;
|
|
5531
|
-
const logicalOffset = itemWidth * (pageIndex * pageWidth) / itemWidth;
|
|
5531
|
+
const logicalOffset = itemWidth * (pageIndex * pageWidth) / (itemWidth || 1);
|
|
5532
5532
|
return Math.max(0, Math.min(lastPageOffset, logicalOffset));
|
|
5533
5533
|
};
|
|
5534
5534
|
const calculateNumberOfPagesForItem = (itemWidth, pageWidth) => {
|