Skip to content

Commit

Permalink
version 3.2.1 fix critical pdf bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TronFortyTwo committed Feb 3, 2021
1 parent 84866d7 commit f326d3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
"maintainer": "Emanuele Sorce <[email protected]>",
"name": "sturmreader.emanuelesorce",
"title": "Sturm Reader",
"version": "3.3.1"
"version": "3.3.2"
}
2 changes: 1 addition & 1 deletion po/sturmreader.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: sturmreader.emanuelesorce\n"
"Report-Msgid-Bugs-To: [email protected] - [email protected]\n"
"POT-Creation-Date: 2021-02-03 14:17+0000\n"
"POT-Creation-Date: 2021-02-03 19:12+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down
10 changes: 6 additions & 4 deletions ui/html/pdfjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ window.onload = function() {
mc.add(Tap);
mc.on("tap press", (ev) => tapPageTurn(ev) );

// load saved page or open from the beginning
if(SAVED_PLACE && SAVED_PLACE.pageNumber && Number(SAVED_PLACE.pageNumber) > 0)
pageNumber = SAVED_PLACE.pageNumber;

// initialize event listeners
document.getElementById("move-canvas").addEventListener("transitionend", transitionPageTurned);

Expand All @@ -312,10 +316,8 @@ window.onload = function() {
first_render = true;
number_of_pages = doc.numPages;
console.log("numberOfPages " + number_of_pages);

// load saved page or open from the beginning
if(SAVED_PLACE && SAVED_PLACE.pageNumber && SAVED_PLACE.pageNumber > 0 && SAVED_PLACE.pageNumber <= pageNumber)
pageNumber = SAVED_PLACE.pageNumber;
// sanitize number of pages related to current new knowledge
pageNumber = Math.min(number_of_pages, pageNumber);

// populate content
doc.getOutline().then( function(ol) {
Expand Down

0 comments on commit f326d3f

Please sign in to comment.