Browse Source

feat: add container to multiple text elements (#9348)

pull/9335/merge
Narek Malkhasyan 8 months ago committed by GitHub
parent
commit
6e47fadb59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/excalidraw/actions/actionBoundText.tsx

4
packages/excalidraw/actions/actionBoundText.tsx

@ -226,8 +226,8 @@ export const actionWrapTextInContainer = register({ @@ -226,8 +226,8 @@ export const actionWrapTextInContainer = register({
trackEvent: { category: "element" },
predicate: (elements, appState, _, app) => {
const selectedElements = app.scene.getSelectedElements(appState);
const areTextElements = selectedElements.every((el) => isTextElement(el));
return selectedElements.length > 0 && areTextElements;
const someTextElements = selectedElements.some((el) => isTextElement(el));
return selectedElements.length > 0 && someTextElements;
},
perform: (elements, appState, _, app) => {
const selectedElements = app.scene.getSelectedElements(appState);

Loading…
Cancel
Save