Browse Source

fix: compute bounding box correctly for text element when multiple element resizing (#6307)

Aakansha Doshi 2 years ago
parent
commit
1ce933d2f5
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/element/resizeElements.ts

+ 3 - 1
src/element/resizeElements.ts

@@ -693,7 +693,9 @@ const resizeMultipleElements = (
       };
       const fontSize = measureFontSizeFromWidth(
         boundTextElement ?? (element.orig as ExcalidrawTextElement),
-        getMaxContainerWidth(updatedElement),
+        boundTextElement
+          ? getMaxContainerWidth(updatedElement)
+          : updatedElement.width,
       );
 
       if (!fontSize) {