1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #18716 from calixteman/stamp_auto_resize

[Editor] Avoid to have a stamp editor resizing itself
This commit is contained in:
calixteman 2024-09-09 22:13:49 +02:00 committed by GitHub
commit 5b4c2fe1a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 8 deletions

View file

@ -659,11 +659,7 @@ class AnnotationEditor {
parentScale,
pageDimensions: [pageWidth, pageHeight],
} = this;
const scaledWidth = pageWidth * parentScale;
const scaledHeight = pageHeight * parentScale;
return FeatureTest.isCSSRoundSupported
? [Math.round(scaledWidth), Math.round(scaledHeight)]
: [scaledWidth, scaledHeight];
return [pageWidth * parentScale, pageHeight * parentScale];
}
/**

View file

@ -553,7 +553,6 @@ class StampEditor extends AnnotationEditor {
const [parentWidth, parentHeight] = this.parentDimensions;
this.width = width / parentWidth;
this.height = height / parentHeight;
this.setDims(width, height);
if (this._initialOptions?.isCentered) {
this.center();
} else {