[Bug-Fix] Fix last page skipping in 2 column mode (#2420)

This commit is contained in:
Andre Smith 2023-11-09 06:11:17 -08:00 committed by GitHub
parent ea56e517dc
commit 6c512ee0dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1216,7 +1216,7 @@ export class BookReaderComponent implements OnInit, AfterViewInit, OnDestroy {
const [scrollOffset, totalScroll] = this.getScrollOffsetAndTotalScroll();
const pageSize = this.getPageSize();
const totalVirtualPages = Math.max(1, Math.round(totalScroll / pageSize));
const totalVirtualPages = Math.max(1, Math.ceil(totalScroll / pageSize));
const delta = scrollOffset - totalScroll;
let currentVirtualPage = 1;