From 94b387ef7ba9d5597a15205da69a91732c7b2d1b Mon Sep 17 00:00:00 2001 From: David Luzar Date: Wed, 2 Mar 2022 23:56:20 +0100 Subject: [PATCH] fix: ensure verticalAlign properties not shown when no element selected (#4860) * fix: ensure verticalAlign properties not shown when no element selected * show verticalAlign prop if selection contains at least one applicable element * simplify --- src/components/Actions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index d74593d51..420cbfd67 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -110,10 +110,10 @@ export const SelectedShapeActions = ({ )} - {targetElements.every( + {targetElements.some( (element) => hasBoundTextElement(element) || isBoundToContainer(element), - ) && <>{renderAction("changeVerticalAlign")}} + ) && renderAction("changeVerticalAlign")} {(canHaveArrowheads(elementType) || targetElements.some((element) => canHaveArrowheads(element.type))) && ( <>{renderAction("changeArrowhead")}