diff --git a/packages/excalidraw/actions/actionProperties.tsx b/packages/excalidraw/actions/actionProperties.tsx index dc4f754039..4a72da6158 100644 --- a/packages/excalidraw/actions/actionProperties.tsx +++ b/packages/excalidraw/actions/actionProperties.tsx @@ -1529,10 +1529,7 @@ export const actionChangeContainerBehavior = register({ // collect directly selected eligible containers for (const el of selected) { - if ( - isFlowchartNodeElement(el) && - getBoundTextElement(el, elementsMap) - ) { + if (isFlowchartNodeElement(el) && getBoundTextElement(el, elementsMap)) { containerIdsToUpdate.add(el.id); } } @@ -1603,8 +1600,7 @@ export const actionChangeContainerBehavior = register({ // case 2: any eligible containers directly selected targetContainers = selected.filter( (el) => - isFlowchartNodeElement(el) && - getBoundTextElement(el, elementsMap), + isFlowchartNodeElement(el) && getBoundTextElement(el, elementsMap), ); } diff --git a/packages/excalidraw/components/Actions.tsx b/packages/excalidraw/components/Actions.tsx index 89a1090da6..8c1bc355f5 100644 --- a/packages/excalidraw/components/Actions.tsx +++ b/packages/excalidraw/components/Actions.tsx @@ -151,11 +151,13 @@ export const SelectedShapeActions = ({ isSingleElementBoundContainer = true; } - const textContainer = targetElements.length === 1 && isTextElement(targetElements[0]) - ? getContainerElement(targetElements[0], elementsMap) - : null; + const textContainer = + targetElements.length === 1 && isTextElement(targetElements[0]) + ? getContainerElement(targetElements[0], elementsMap) + : null; - const isStickyNoteContainer = textContainer && isFlowchartNodeElement(textContainer); + const isStickyNoteContainer = + textContainer && isFlowchartNodeElement(textContainer); const isEditingTextOrNewElement = Boolean( appState.editingTextElement || appState.newElement, @@ -241,7 +243,7 @@ export const SelectedShapeActions = ({ renderAction("changeTextAlign")} > )} - + {shouldAllowVerticalAlign(targetElements, elementsMap) && renderAction("changeVerticalAlign")} {(canHaveArrowheads(appState.activeTool.type) || @@ -250,7 +252,7 @@ export const SelectedShapeActions = ({ )} {isStickyNoteContainer && <>{renderAction("changeContainerBehavior")}>} - + {renderAction("changeOpacity")}