Skip to content

Commit

Permalink
Merge pull request #15923 from Snuffleupagus/zoom-black-canvas
Browse files Browse the repository at this point in the history
[Regression] Avoid showing a black canvas during zooming with a `drawingDelay` set (PR 15812 follow-up)
  • Loading branch information
Snuffleupagus authored Jan 15, 2023
2 parents bc3b59f + 906745d commit 1ca0a7a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
);
Expand Down

0 comments on commit 1ca0a7a

Please sign in to comment.