Explorar o código

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

Aakansha Doshi %!s(int64=2) %!d(string=hai) anos
pai
achega
1ce933d2f5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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) {