浏览代码

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

Narek Malkhasyan 4 月之前
父节点
当前提交
6e47fadb59
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      packages/excalidraw/actions/actionBoundText.tsx

+ 2 - 2
packages/excalidraw/actions/actionBoundText.tsx

@@ -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);