[Regression] Avoid showing a black canvas during zooming with a drawingDelay
set (PR 15812 follow-up)
After the changes in PR 15812 we'll now *intermittently* display completely black canvases during zooming. To reproduce this, try switching to wrapped-scrolling and zoom in/out very quickly using either the mouse-wheel or pinching.
This commit is contained in:
parent
517d7a6dc3
commit
906745de38
@ -1071,7 +1071,12 @@ class PDFPageView {
|
|||||||
renderCapability.resolve();
|
renderCapability.resolve();
|
||||||
},
|
},
|
||||||
function (error) {
|
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);
|
renderCapability.reject(error);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user