Skip to content

Commit cef2ac9

Browse files
authored
Merge pull request #15298 from calixteman/ink_min_size
[Editor] Ensure an ink editor has the minimal required size after having been pasted
2 parents 3eb11fa + 63361dc commit cef2ac9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/display/editor/ink.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,8 @@ class InkEditor extends AnnotationEditor {
10341034
}
10351035

10361036
const bbox = editor.#getBbox();
1037-
editor.#baseWidth = bbox[2] - bbox[0];
1038-
editor.#baseHeight = bbox[3] - bbox[1];
1037+
editor.#baseWidth = Math.max(RESIZER_SIZE, bbox[2] - bbox[0]);
1038+
editor.#baseHeight = Math.max(RESIZER_SIZE, bbox[3] - bbox[1]);
10391039
editor.#setScaleFactor(width, height);
10401040

10411041
return editor;

0 commit comments

Comments
 (0)