Merge pull request #16227 from Snuffleupagus/zooming-regressions

Fix various zooming regressions (PR 15812 follow-up)
This commit is contained in:
Jonas Jenwald 2023-03-29 12:15:26 +02:00 committed by GitHub
commit 43917796c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -607,14 +607,13 @@ class PDFPageView {
isScalingRestricted = true;
}
}
const postponeDrawing = drawingDelay >= 0 && drawingDelay < 1000;
const onlyCssZoom =
this.useOnlyCssZoom || (this.hasRestrictedScaling && isScalingRestricted);
const postponeDrawing =
!onlyCssZoom && drawingDelay >= 0 && drawingDelay < 1000;
if (this.canvas) {
if (
postponeDrawing ||
this.useOnlyCssZoom ||
(this.hasRestrictedScaling && isScalingRestricted)
) {
if (postponeDrawing || onlyCssZoom) {
if (
postponeDrawing &&
this.renderingState !== RenderingStates.FINISHED
@ -759,10 +758,7 @@ class PDFPageView {
scaleX = height / width;
scaleY = width / height;
}
if (absRotation !== 0) {
target.style.transform = `rotate(${relativeRotation}deg) scale(${scaleX}, ${scaleY})`;
}
target.style.transform = `rotate(${relativeRotation}deg) scale(${scaleX}, ${scaleY})`;
}
if (redrawAnnotationLayer && this.annotationLayer) {