Merge pull request #15872 from Snuffleupagus/PDFPageView-setDimensions-regression

[Regression] Ensure that documents with varying page sizes are initialized correctly (PR 15812 follow-up)
This commit is contained in:
Jonas Jenwald 2022-12-27 13:24:06 +01:00 committed by GitHub
commit ec6ad91bb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,6 @@ class PDFPageView {
this.div = div;
this.#setDimensions();
container?.append(div);
if (
@ -230,10 +229,12 @@ class PDFPageView {
#setDimensions() {
const { viewport } = this;
if (this.#previousRotation === viewport.rotation) {
return;
if (this.pdfPage) {
if (this.#previousRotation === viewport.rotation) {
return;
}
this.#previousRotation = viewport.rotation;
}
this.#previousRotation = viewport.rotation;
setLayerDimensions(
this.div,