Node link placement differ between simple and composite Node

0 votes
asked Dec 8, 2015 in Bug by Serge Wenger Work (16,630 points)
Hello,
I use plantuml.8033.jar
 
The link direction between a single node and a node with a component are different (D1)
I am happy with the sample on first page, but not on second one.
 
@startuml
node  "P1" as P1{
[P2] as P2
}
node  "switch" as switch
switch -- P2 
 
node  "C1" as C2 {
[C3] as C3
}
C3 -- switch
 
node  "D1" as D1 {
'REMOVE THIS COMMENT [D2] as D2
}
switch - D1
newpage
node  "P1" as P1{
[P2] as P2
}
node  "switch" as switch
switch -- P2 
 
node  "C1" as C2 {
[C3] as C3
}
C3 -- switch
 
node  "D1" as D1 {
[D2] as D2
}
switch -right- D1
 
@enduml
 
Could you please help me?
 
Thanks for this great software
 

1 Answer

+2 votes
answered Dec 8, 2015 by plantuml (298,440 points)
selected Dec 8, 2015 by Serge Wenger Work
 
Best answer

The is an undocumented feature that will help you.

You can add a special command to enable this:
!pragma horizontalLineBetweenDifferentPackageAllowed

The reason why it's disabled by default is that Graphviz is sometimes crashing with this feature.
BTW, tell us if you find some crashes.

Example:

 



@startuml
!pragma horizontalLineBetweenDifferentPackageAllowed
node  "P1" as P1{
[P2] as P2
}
node  "switch" as switch
switch -- P2
 
node  "C1" as C2 {
[C3] as C3
}
C3 -- switch
 
node  "D1" as D1 {
[D2] as D2
}
switch -right- D1
@enduml


Hope this help!

commented Dec 8, 2015 by Serge Wenger Work (16,630 points)
Thanks, it is exactly what I need
Best Regards
Serge
...