From 07a8b76d3ab4a541a4b3a3d14de375a0325253b1 Mon Sep 17 00:00:00 2001 From: John Factotum <50942278+johnfactotum@users.noreply.github.com> Date: Sun, 25 Dec 2022 01:49:20 +0000 Subject: [PATCH] Fixes for non-1:1 zoom levels Hopefully fixes #2 --- paginator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/paginator.js b/paginator.js index 9ff9b63..3f30095 100644 --- a/paginator.js +++ b/paginator.js @@ -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` @@ -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() {