Placing Text Inside of a Port

0 votes
asked Oct 25 in Question / help by Tassos

Is it possible to place the text that labels a port, inside of the port box? can the port box change size to allow text inside?

The text looks very ugly on the outside and overlaps with other things in more complex diagrams, and can be spaced a bit far from the port that its hard to see that the label is meant for that port

@startuml
left to right direction
rectangle "A" as A {
    portout "PCI" as p1
    }
}

@enduml

image

1 Answer

0 votes
answered Oct 25 by The-Lu (73,540 points)

Hello T.,

That is not yet possible..

Here are some workarounds:

1/ Use color, as:

2/ Use Object with Qualified associations as:

@startuml
object A
object B
A [PCI_1] -> B
A [PCI_2] -> B
@enduml

If that can help,
Regards,
Th.

commented Oct 25 by Tassos
Wow that object qualified associations is exactly what I need thank you so much

I have been playing around with it a little bit and saw from an error output that i can use allowmixing and it seems to make it work with other things that aren't objects, like rectangles which is really cool

yeah I thought about colour coding as well, thats also good to know thank you

Honestly when I posted my question I wasn't expecting to get a solution aha thank you so much for the help :)
...