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

[Editor] Avoid to have a stamp editor resizing itself

Fixes #18715.
This commit is contained in:
Calixte Denizet 2024-09-09 15:26:33 +02:00
parent a1b45d6e69
commit 3f23bcbecc
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 {