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