1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2025-02-18 13:29:36 +01:00

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
This commit is contained in:
David Luzar 2022-03-02 23:56:20 +01:00 committed by GitHub
parent 6d0716eb6b
commit 94b387ef7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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