如何在 PlantUML 类图中对齐块? [英] How to align blocks in PlantUML class diagrams?
本文介绍了如何在 PlantUML 类图中对齐块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 PlantUML 制作简单的类图,该工具非常棒,但除了将它们放入包或使用像 Alice -left-* Bob 这样的关系之外,我找不到任何方法来使类相互对齐.我需要的是这样的:
I am using PlantUML to make simple class diagrams and the tool is awesome, but I couldn't find any way to align classes with each other except putting them into packages or using relationships like Alice -left-* Bob. What I need is something like:
@startuml
class Bob
class Alice
class Dan
**Dan aligned Alice: horizontally**
'or using a grid?
**Bob at grid (2, 3)**
@enduml
有办法吗?
推荐答案
使用 -[hidden]
关系可以完成这项工作:
Using a -[hidden]
relation can do the job :
@startuml
class Bob
class Alice
class Dan
class Foo
class Bar
class Foobar
Bob -[hidden] Alice
Bar -[hidden] Foobar
@enduml
这篇关于如何在 PlantUML 类图中对齐块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文