Skip to content

Commit

Permalink
Avoid ppi<10 causing UI to break
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrini authored Sep 14, 2023
1 parent 7361245 commit aa167a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/BookReader/BookModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ export class PageModel {
* @param {PageIndex} index
*/
constructor(book, index) {
// TODO: Get default from config
this.ppi = book._getDataProp(index, 'ppi', book.ppi);
// Values less than 10 cause the UI to not work correctly
this.ppi = Math.max(book._getDataProp(index, 'ppi', book.ppi), 10);
this.book = book;
this.index = index;
this.width = book.getPageWidth(index);
Expand Down

0 comments on commit aa167a9

Please sign in to comment.