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:
Jonas Jenwald 2023-01-15 12:29:06 +01:00 committed by GitHub
commit 1ca0a7a26c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
);