From 63361dcfc775213c78d334992d607713456808d6 Mon Sep 17 00:00:00 2001 From: Calixte Denizet Date: Wed, 10 Aug 2022 10:15:23 +0200 Subject: [PATCH] [Editor] Ensure an ink editor has the minimal required size after having been pasted --- src/display/editor/ink.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/display/editor/ink.js b/src/display/editor/ink.js index f5f74a676..10bffab45 100644 --- a/src/display/editor/ink.js +++ b/src/display/editor/ink.js @@ -1034,8 +1034,8 @@ class InkEditor extends AnnotationEditor { } const bbox = editor.#getBbox(); - editor.#baseWidth = bbox[2] - bbox[0]; - editor.#baseHeight = bbox[3] - bbox[1]; + editor.#baseWidth = Math.max(RESIZER_SIZE, bbox[2] - bbox[0]); + editor.#baseHeight = Math.max(RESIZER_SIZE, bbox[3] - bbox[1]); editor.#setScaleFactor(width, height); return editor;