diff --git a/src/display/editor/ink.js b/src/display/editor/ink.js index 4767e5d7e..231571b7c 100644 --- a/src/display/editor/ink.js +++ b/src/display/editor/ink.js @@ -580,7 +580,10 @@ class InkEditor extends AnnotationEditor { this.canvas.style.visibility = "hidden"; - if (this.#aspectRatio) { + if ( + this.#aspectRatio && + Math.abs(this.#aspectRatio - width / height) > 1e-2 + ) { height = Math.ceil(width / this.#aspectRatio); this.setDims(width, height); } @@ -848,6 +851,9 @@ class InkEditor extends AnnotationEditor { this.#setCanvasDims(); this.#redraw(); + this.#realWidth = width; + this.#realHeight = height; + this.setDims(width, height); this.translate( prevTranslationX - this.translationX,