如何使 PlantUML 左/右/上/下箭头更长
PlantUML 中切换箭头方向的语法很清晰。可以使用 -left->、-right->、-up->、-down-> 等符号。分别实现左、右、上、下方向性。文档同样清楚地表明,在语法上,可以通过增加 UML 代码中箭头中的虚线数量来增加渲染时箭头的长度(例如 --> 增加为 ---> 或 --- ->)。
当还包含方向性时,这似乎不起作用(至少在 Jebbs 的 Visual Studio Code 扩展中)。因此,例如,-left--->不会增加箭头的长度。这是预期的行为吗?
The syntax for switching the directionality of the arrows in PlantUML is clear. One can use an -left->, -right->, -up->, -down-> to achieve left, right, up, and down directionality respectively. The documentation is equally clear that increasing the length of an arrow on rendering can be done syntactically through increasing the number of dashed in the arrow in the UML code (eg. --> is increased to ---> or ---->).
This doesn't seem to work (at least in the Visual Studio Code extension by Jebbs) when there is also directionality included. So, for example, -left---> does not increase the length of the arrow. Is this expected behavior?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现您可以通过关联上的空白标签来控制行的长度:
Foo -r->;酒吧:“”
或
Foo -u->栏:“\n\n\n\n”
I've found you can control the length of the lines is via a blank label on the association:
Foo -r-> Bar : " "
or
Foo -u-> Bar : "\n\n\n\n"
使用最新的在线服务器,这个code 不会产生一致的结果(它仅适用于
up
和down
)。看起来像一个错误。编辑: 添加
skinparam Nodesep 50
(该数字增加了所有类的水平分隔)是解决此错误的可能方法。Using the latest online server, this code doesn't produce consistent results (it only works for
up
anddown
). Seems like a bug.EDIT: adding
skinparam nodesep 50
(the number increases horizontal separation for all classes) is a possible work-around to this bug.