Skip to content

Commit

Permalink
Remove bottom 10px margin of last page in PDF viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Yu committed Oct 31, 2024
1 parent 668b3cf commit 48a4cb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
12 changes: 0 additions & 12 deletions viewer/components/refresh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,18 +205,6 @@ function addMasks() {
div.appendChild(img)
viewerContainer.appendChild(div)
div.style.display = 'inherit'

// This workaround is for the last page of the document.
const anchor = document.createElement('div')
anchor.className = 'page-loading-anchor'
masks.push(anchor)
anchor.style.display = 'inherit'
anchor.style.position = 'absolute'
anchor.style.left = pageBound.x - viewerBound.x + 'px'
anchor.style.top = pageBound.y - viewerBound.y + pageBound.height + 'px'
anchor.style.width = '10px'
anchor.style.height = '10px'
viewerContainer.appendChild(anchor)
}
return masks
}
Expand Down
4 changes: 4 additions & 0 deletions viewer/latexworkshop.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ html[dir='rtl'] .findbar {
box-shadow: 0px 0px 0px 1px lightgrey;
}

.pdfViewer.removePageBorders .page:last-of-type {
margin-bottom: 0px;
}

.pdfViewer.removePageBorders .spread .page:first-of-type {
margin-inline-start: 0px;
margin-inline-end: 5px;
Expand Down

0 comments on commit 48a4cb7

Please sign in to comment.