Skip to content

Commit

Permalink
Merge pull request #454 from d-i-t-a/develop
Browse files Browse the repository at this point in the history
2.3.2
  • Loading branch information
aferditamuriqi authored Mar 25, 2023
2 parents 42e1ee1 + 3e474e8 commit 2da4a49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
7 changes: 5 additions & 2 deletions src/views/ReflowableBookView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);
}
}

Expand Down Expand Up @@ -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;
}
}

0 comments on commit 2da4a49

Please sign in to comment.