1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 15:18:08 +02:00

[api-minor] Respect the drawingDelay also when CSS-only zooming is used (issue 18022)

If a user manually calls `PDFPageView.prototype.update()` with a `drawingDelay`-option then it'll always be necessary to re-call the method *without* a delay afterwards, regardless of the `maxCanvasPixels`-value (e.g. even when CSS-only zooming is used).
This commit is contained in:
Jonas Jenwald 2024-05-13 15:11:38 +02:00
parent b6765403a1
commit 1a3ea15950

View file

@ -667,12 +667,12 @@ class PDFPageView {
this.maxCanvasPixels;
}
}
const postponeDrawing =
!onlyCssZoom && drawingDelay >= 0 && drawingDelay < 1000;
const postponeDrawing = drawingDelay >= 0 && drawingDelay < 1000;
if (postponeDrawing || onlyCssZoom) {
if (
postponeDrawing &&
!onlyCssZoom &&
this.renderingState !== RenderingStates.FINISHED
) {
this.cancelRendering({