skanaar / nomnoml

The sassy UML diagram renderer
https://www.nomnoml.com
MIT License
2.7k stars 209 forks source link

Is it possible to set a minimum line/arrow length? #125

Closed VororRich closed 4 years ago

VororRich commented 4 years ago

In some cases when using association arrows, they are obscured due to the arrows being too short.

[<actor> Patient] is subject of o-> has subject [event]

image

WORKAROUND At the moment I can work around by adding 2 hidden concepts with a hidden relationship to force padding...

#.hide: visual=hidden empty
[<hide> PADDED DISPLAY LAYOUT]-/-[<hide> PADDED DISPLAY RELATIONSHIP]
[<actor> Patient] is subject of o-> has subject [event]

image

skanaar commented 4 years ago

You might be looking for the #spacing directive.

#direction: right
#spacing: 300
#arrowSize: 0.15
[<actor> Patient] is subject of o-> has subject [event]

The #arrowSize is defined as a multiple of the #spacing so we have to adjust that as well when modifying the spacing.

This applies to the diagram as a whole, if you need individual edge settings the hidden node is probably the way to go.