浏览代码

fix: show link icon for bound text containers (#4960)

Aakansha Doshi 3 年之前
父节点
当前提交
2209e2c1e8
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/components/Actions.tsx

+ 4 - 1
src/components/Actions.tsx

@@ -64,6 +64,9 @@ export const SelectedShapeActions = ({
     hasBackground(elementType) ||
     targetElements.some((element) => hasBackground(element.type));
 
+  const showLinkIcon =
+    targetElements.length === 1 || isSingleElementBoundContainer;
+
   let commonSelectedType: string | null = targetElements[0]?.type || null;
 
   for (const element of targetElements) {
@@ -177,7 +180,7 @@ export const SelectedShapeActions = ({
             {!deviceType.isMobile && renderAction("deleteSelectedElements")}
             {renderAction("group")}
             {renderAction("ungroup")}
-            {targetElements.length === 1 && renderAction("hyperlink")}
+            {showLinkIcon && renderAction("hyperlink")}
           </div>
         </fieldset>
       )}