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:
parent
affce70a09
commit
3fc6b1321f
2 changed files with 48 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue