Troubleshooting anchors#
Some UML elements are drawn with several TikZ nodes, such as class with template parameters. As far as the location of the anchor between the element and a relationship, you may want to set the rerlationship to a secondary node of the element, such as the template box of a class.
Template classes and relationships#
As far as a template class is concerned, there are cases in which a relation about it will not be drawn correctly, as in the picture below, where the aggregation symbol is hidden by the template parameter:
\umlemptyclass[template=T]{A}
\umlemptyclass[x=4,y=2]{B}
\umluniaggregate{A}{B}
To solve this problem, you link the arrow between the template part of class A and class B, by adding the suffix -template and adjusting the start anchor (the -30 value is correct here):
\umlemptyclass[template=T]{A}
\umlemptyclass[x=4,y=2]{B}
\umluniaggregate[anchor1=-30]{A-template}{B}