mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-19 22:58:07 +02:00
Merge pull request #15923 from Snuffleupagus/zoom-black-canvas
[Regression] Avoid showing a black canvas during zooming with a `drawingDelay` set (PR 15812 follow-up)
This commit is contained in:
commit
1ca0a7a26c
1 changed files with 6 additions and 1 deletions
|
@ -1071,7 +1071,12 @@ class PDFPageView {
|
|||
renderCapability.resolve();
|
||||
},
|
||||
function (error) {
|
||||
showCanvas();
|
||||
// When zooming with a `drawingDelay` set, avoid temporarily showing
|
||||
// a black canvas if rendering was cancelled before the `onContinue`-
|
||||
// callback had been invoked at least once.
|
||||
if (!(error instanceof RenderingCancelledException)) {
|
||||
showCanvas();
|
||||
}
|
||||
renderCapability.reject(error);
|
||||
}
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue