Browse Source

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
David Luzar 3 years ago
parent
commit
94b387ef7b
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/components/Actions.tsx

+ 2 - 2
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")}</>