Adjust "MobileReaderProgressBar" styling
In case the current page is the first one, there will be now no visible progress shown anymore. The progress slider will now be exactly at the start of the progress bar.
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) / pagesLength) * 100}%`,
|
||||
width: `calc(100% / ${pagesLength})`,
|
||||
left: `${(Math.max(0, currentPagesIndex - 1) / (pagesLength - 1)) * 100}%`,
|
||||
width: `calc(100% / ${pagesLength - 1})`,
|
||||
height: '100%',
|
||||
}),
|
||||
...applyStyles(getProgressBarPositionInfo(progressBarPosition).isVertical, {
|
||||
top: `${(Math.max(0, currentPagesIndex) / pagesLength) * 100}%`,
|
||||
top: `${(Math.max(0, currentPagesIndex - 1) / pagesLength - 1) * 100}%`,
|
||||
width: '100%',
|
||||
height: `calc(100% / ${pagesLength})`,
|
||||
height: `calc(100% / ${pagesLength - 1})`,
|
||||
}),
|
||||
...boxProps?.sx,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user