-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ebook reader: page not scroll to top after leaf through (prev or next) #73
Comments
Reader is designed for reading full pages, without scrolling. In what context do you have to scroll the page up after turning a page. Also, which renderer (Epub, PDF, CBx) does this apply to? |
This applies to pdf renderer. A PDF page renders with a tiny font in fit-to-screen mode. It is very uncomfortable to read even on 24" monitor @ 1920x1080. |
Try the following patch: diff --git a/files_reader/vendor/pdfjs/pdf.reader.js b/files_reader/vendor/pdfjs/pdf.reader.js
index 510d3d7..b5bc3ec 100644
--- a/files_reader/vendor/pdfjs/pdf.reader.js
+++ b/files_reader/vendor/pdfjs/pdf.reader.js
@@ -752,6 +752,7 @@ PDFJS.Reader.prototype.renderPage = function(pageNum) {
renderTask.promise.then(
function pdfPageRenderCallback (something) {
if (reader.cancelPage[pageNum] === undefined) {
+ document.getElementById('viewer').scrollTo(0,0);
if (double_buffer)
ctx.drawImage(oscanvas, 0, 0);
if (textLayer) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It is very annoying to scroll to the top of a page every time after swithing to next or prevoius page.
The text was updated successfully, but these errors were encountered: