feat: vertical align for labelled arrows

This commit is contained in:
Aakansha Doshi 2023-04-26 18:01:49 +05:30
parent da8dd389a9
commit 66ccc254f0
2 changed files with 20 additions and 2 deletions

View file

@ -793,7 +793,11 @@ export const shouldAllowVerticalAlign = (
const hasBoundContainer = isBoundToContainer(element);
if (hasBoundContainer) {
const container = getContainerElement(element);
if (isTextElement(element) && isArrowElement(container)) {
if (
isTextElement(element) &&
isArrowElement(container) &&
container.points.length > 2
) {
return false;
}
return true;