diff --git a/package-lock.json b/package-lock.json index 17d71356..71f572de 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@d-i-t-a/reader", - "version": "2.3.1", + "version": "2.3.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@d-i-t-a/reader", - "version": "2.3.1", + "version": "2.3.2", "license": "Apache-2.0", "dependencies": { "@types/pdfjs-dist": "^2.7.4", diff --git a/package.json b/package.json index 824bec60..8f22de68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@d-i-t-a/reader", - "version": "2.3.1", + "version": "2.3.2", "description": "A viewer application for EPUB files.", "repository": "https://github.com/d-i-t-a/R2D2BC", "license": "Apache-2.0", diff --git a/src/views/ReflowableBookView.ts b/src/views/ReflowableBookView.ts index d9581f40..7a2a5eb3 100644 --- a/src/views/ReflowableBookView.ts +++ b/src/views/ReflowableBookView.ts @@ -323,7 +323,10 @@ export default class ReflowableBookView implements BookView { } else { // TODO: need to double check this, why sometimes we get "rightWidth 0.091064453125" const rightWidth = Math.floor(this.getRightColumnsWidth()); - return rightWidth <= 0; + return ( + rightWidth <= 0 || + Math.ceil(this.getCurrentPage()) === this.getPageCount() + ); } } @@ -577,7 +580,7 @@ export default class ReflowableBookView implements BookView { get scrollWidth() { const scrollWidth = this.scrollingElement?.scrollWidth; const width = this.getColumnWidth(); - const pages = Math.floor(scrollWidth / width); + const pages = Math.ceil(scrollWidth / width); return pages * width; } }