Skip to content

Commit

Permalink
Minor fix in pdf preview
Browse files Browse the repository at this point in the history
  • Loading branch information
abzokhattab committed Apr 10, 2024
1 parent 8549d5b commit 12a147e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PageRenderer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function PageRenderer({index, style, data}: Props) {
*/
const pageHeight = calculatePageHeight(index);
const devicePixelRatio = getDevicePixelRatio(pageWidth, pageHeight);
const topPadding = numPages > 1 ? parseFloat(style.top as unknown as string) + PAGE_BORDER : containerHeight - parseFloat(style.height as unknown as string) / 2;
const topPadding = numPages > 1 ? parseFloat(style.top as unknown as string) + PAGE_BORDER : (containerHeight - parseFloat(style.height as unknown as string)) / 2;
return (
<div style={{...styles.pageWrapper, ...style, top: `${topPadding}px`}}>
<Page
Expand Down

0 comments on commit 12a147e

Please sign in to comment.