is there any way to make the arrow between frames being align center

0 votes
asked Feb 20, 2021 in Question / help by hick (120 points)

as the following, the arrow between frames is on the left side.  Is there any way to make the arrow between frames being align center?

http://www.plantuml.com/plantuml/uml/JSpT2SCm30JWTqsX1VBG1KhY6Rg06Yibr5Q2Vg0Gkdk33IKlnnryt6XEwb4Bs7kLdPGgPbueYZ_uurDPNr9P7ESpM06MKp26iKu7pAGPTTkyDuld3RvNamv0_AlKHeUfoVQ3G-p3lNiOMNBKyWC0

PlantUML diagram

commented Feb 21, 2021 by hick (120 points)
making connections between subB/rootB with sub1/root looks more bueatiful, but not a good solution

2 Answers

+1 vote
answered Feb 21, 2021 by chris (2,540 points)
commented Feb 22, 2021 by hick (120 points)
clever solution! thx a lot
commented Feb 22, 2021 by Martin (8,360 points)

Attaching picture of answer suggestion for easy browsing

+1 vote
answered Feb 22, 2021 by The-Lu (64,340 points)

Hello H., C.,

Another workaround, you can use sub-diagram as:

@startuml
skinparam FrameBackgroundcolor white

frame userA [
{{
card root
card sub1
}}
]

frame userB [
{{
  card rootB
  card subB1
}}
]

userA -up-> userB
@enduml


But with that we will lost tab name and the sub-element are no longer linkable.

See also this answer: https://forum.plantuml.net/9875/arrow-is-starting-on-a-strange-side-of-file?show=11586#a11586

If that can help,
Regards,
Th.

commented Feb 22, 2021 by Martin (8,360 points)

A variant on this is to sacrifice some arrow length for the tab names:

commented Feb 23, 2021 by hick (120 points)
got it! great! thx a lot
commented Feb 23, 2021 by The-Lu (64,340 points)

Another variant, with the same elements (frame, label and card) and sub-diagram, but with a longer arrow:


[See on PlantUML server]

Regards,
Th.

commented Jan 22, 2023 by The-Lu (64,340 points)

Another workaround without sub-diag, and only empty labels, as:

@startuml
frame userA {
  card root
  label " " as l1
  card sub1
}

frame userB {
  card rootB
  label " " as l2
  card subB1
}

l2 <-- l1
@enduml

See also similar request here:

If that can help,
Regards.

...