Arrow is starting on a strange side of "file"

+1 vote
asked Jul 12, 2019 in Question / help by sach

I want to draw an arrow from "file" to "file"

@startuml
file f1{
}
file f2{
}
f1 -ri-> f2
@enduml

This image is drawn as I thought

But, when I add some classes, the arrow is drawn not straight and starting on upper side (not right side) of box.

@startuml
file f1{
class f1hoge
class f1piyo
}
file f2{
class f2hoge
class f2piyo
}
f1 -ri-> f2
@enduml

This phenomenon occurs on not only "file" but also "namespace" and "package".

Is it specification or bug?

How can I draw an arrow from right side of f1 to left side of f2? 

1 Answer

+1 vote
answered May 26, 2020 by The-Lu (63,920 points)

Hello S.,

You can use embedded diagram or sub-diagram.

Pay attention to the fact: what you gain with, you also lose with (because it is an independent sub-diagram [without any link with the hosted diagram]).

See more details:

Then with this feature:

file f1 [
{{
class f1hoge
class f1piyo
}}
]

file f2 [
{{
class f2hoge
class f2piyo
}}
]

f1 -ri-> f2

We obtain:

If that can help,
Regards,
Th.

...