Skip to content

Commit

Permalink
Adjust vertical alignment in elements when stereotype is invisible
Browse files Browse the repository at this point in the history
  • Loading branch information
farisd16 committed Aug 5, 2024
1 parent ed7e1e1 commit 7326daf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const UMLComponentComponent: FunctionComponent<Props> = ({ element, child
{${element.stereotype}»`}
</tspan>
)}
<tspan x="50%" dy={element.stereotype && element.displayStereotype ? 18 : 10} textAnchor="middle">
<tspan x="50%" dy={element.stereotype && element.displayStereotype ? 18 : 0} textAnchor="middle">
{element.name}
</tspan>
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const UMLComponentSubsystem: FunctionComponent<Props> = ({ element, child
{${element.stereotype}»`}
</tspan>
)}
<tspan x="50%" dy={element.stereotype && element.displayStereotype ? 18 : 10} textAnchor="middle">
<tspan x="50%" dy={element.stereotype && element.displayStereotype ? 18 : 0} textAnchor="middle">
{element.name}
</tspan>
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const UMLDeploymentNodeComponent: FunctionComponent<Props> = ({ element,
)}
<tspan
x="50%"
dy={element.stereotype && element.displayStereotype ? 18 : 10}
dy={element.stereotype && element.displayStereotype ? 18 : 0}
textDecoration="underline"
textAnchor="middle"
>
Expand Down

0 comments on commit 7326daf

Please sign in to comment.