1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

[Editor] Scale the signature editor when it's too large (bug 1948741)

This commit is contained in:
Calixte Denizet 2025-02-17 20:20:26 +01:00
parent affce70a09
commit 3fc6b1321f
2 changed files with 48 additions and 0 deletions

View file

@ -248,6 +248,11 @@ class SignatureEditor extends DrawingEditor {
newHeight = newHeight >= 1 ? 0.5 : newHeight;
this.width *= newHeight / this.height;
if (this.width >= 1) {
newHeight *= 0.9 / this.width;
this.width = 0.9;
}
this.height = newHeight;
this.setDims(parentWidth * this.width, parentHeight * this.height);
this.x = savedX;