Skip to content

Commit

Permalink
Fixes for non-1:1 zoom levels
Browse files Browse the repository at this point in the history
Hopefully fixes #2
  • Loading branch information
johnfactotum authored Dec 25, 2022
1 parent 7e5d21f commit 07a8b76
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion paginator.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ class View {
this.#element.style[side] = `${expandedSize}px`
this.#iframe.style[otherSide] = '100%'
this.#element.style[otherSide] = '100%'
if (this.document)
this.document.documentElement.style[side] = `${expandedSize}px`
if (this.#overlayer) {
this.#overlayer.element.style.margin = '0'
this.#overlayer.element.style[side] = `${expandedSize}px`
Expand Down Expand Up @@ -423,7 +425,7 @@ export class Paginator {
return Math.floor(((this.start + this.end) / 2) / this.size)
}
get pages() {
return this.viewSize / this.size
return Math.round(this.viewSize / this.size)
}
// allows one to process rects as if they were LTR and horizontal
#getRectMapper() {
Expand Down

0 comments on commit 07a8b76

Please sign in to comment.