Fix reader progress bar current page slot positioning for single page chapters
Was only noticeable in the mobile reader ui because the desktop one hides this component and uses its own logic. It resulted in the previous/next button not being clickable because the current page component was overlaying it
This commit is contained in:
@@ -37,14 +37,14 @@ export const ReaderProgressBarCurrentPageSlot = ({
|
||||
position: 'absolute',
|
||||
cursor: isDragging ? 'grabbing' : 'grab',
|
||||
...applyStyles(getProgressBarPositionInfo(progressBarPosition).isHorizontal, {
|
||||
left: `${(Math.max(0, currentPagesIndex - 1) / (pagesLength - 1)) * 100}%`,
|
||||
width: `calc(100% / ${pagesLength - 1})`,
|
||||
left: `${(Math.max(0, currentPagesIndex - 1) / pagesLength) * 100}%`,
|
||||
width: `calc(100% / ${pagesLength})`,
|
||||
height: '100%',
|
||||
}),
|
||||
...applyStyles(getProgressBarPositionInfo(progressBarPosition).isVertical, {
|
||||
top: `${(Math.max(0, currentPagesIndex - 1) / (pagesLength - 1)) * 100}%`,
|
||||
top: `${(Math.max(0, currentPagesIndex - 1) / pagesLength) * 100}%`,
|
||||
width: '100%',
|
||||
height: `calc(100% / ${pagesLength - 1})`,
|
||||
height: `calc(100% / ${pagesLength})`,
|
||||
}),
|
||||
...boxProps?.sx,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user