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

This commit is contained in:
Aakansha Doshi 2023-03-03 17:34:11 +05:30 committed by GitHub
parent 15655acb5a
commit 1ce933d2f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

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