-
-
Notifications
You must be signed in to change notification settings - Fork 901
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
pdfjs black flicker #1279
pdfjs black flicker #1279
Conversation
// Show the canvas on success and on errors | ||
.then(this.onRenderSuccess) | ||
.catch(this.onRenderError) | ||
.finally(this.showCanvas) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In our fork we actually implemented the following and can confirm it works. However I noticed it failed a test so I changed it to finally
, which I believe should have the same effect barring a little different timing.
.then(this.showCanvas, this.showCanvas)
.then(this.onRenderSuccess)
.catch(this.onRenderError)
I am also experiencing this issue so this PR is helpful |
This is really helpful. Pages with complex graphics take longer to render and showing black looks bad. |
36a36d4
to
e249af6
Compare
744f655
to
5b90b65
Compare
This comment looks to have been removed (although I can't find the commit for it?), but for anyone who's looking, this is the comment |
f5a9fd6
to
9243e45
Compare
fbeabf1
to
240150a
Compare
See comment in pdfjs viewer code: https://github.com/mozilla/pdf.js/blob/master/web/pdf_page_view.js#L994
We also encountered this issue after adding
alpha: false
to canvas context. On zoom or on load the documents now load in from black (a direct consequence ofalpha: false
). The idea here is to hide the canvas until it loads.@wojtekmaj Just gonna leave this PR here. Feel free to close and rewrite according to what you think is best :)