From 1a3ea159507754faf064795084315875cbb5338f Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Mon, 13 May 2024 15:11:38 +0200 Subject: [PATCH] [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). --- web/pdf_page_view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 5c4d9d4e0..93c5be78f 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -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({