mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: show link icon for bound text containers (#4960)
This commit is contained in:
parent
ed31980f84
commit
2209e2c1e8
1 changed files with 4 additions and 1 deletions
|
@ -64,6 +64,9 @@ export const SelectedShapeActions = ({
|
||||||
hasBackground(elementType) ||
|
hasBackground(elementType) ||
|
||||||
targetElements.some((element) => hasBackground(element.type));
|
targetElements.some((element) => hasBackground(element.type));
|
||||||
|
|
||||||
|
const showLinkIcon =
|
||||||
|
targetElements.length === 1 || isSingleElementBoundContainer;
|
||||||
|
|
||||||
let commonSelectedType: string | null = targetElements[0]?.type || null;
|
let commonSelectedType: string | null = targetElements[0]?.type || null;
|
||||||
|
|
||||||
for (const element of targetElements) {
|
for (const element of targetElements) {
|
||||||
|
@ -177,7 +180,7 @@ export const SelectedShapeActions = ({
|
||||||
{!deviceType.isMobile && renderAction("deleteSelectedElements")}
|
{!deviceType.isMobile && renderAction("deleteSelectedElements")}
|
||||||
{renderAction("group")}
|
{renderAction("group")}
|
||||||
{renderAction("ungroup")}
|
{renderAction("ungroup")}
|
||||||
{targetElements.length === 1 && renderAction("hyperlink")}
|
{showLinkIcon && renderAction("hyperlink")}
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue