skanaar / nomnoml

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

Incomplete rendering #128

Closed moodymudskipper closed 3 years ago

moodymudskipper commented 4 years ago

The following code doesn't display right :

[fun(x)]  -> [if (x)]
[if (x)] y -> [if (y)]
[if (y)] y -> [foo]
[foo]  -> [<end> -2]
[if (y)] n -> [bar]
[bar]  -> [<end> -2]
[<end> -2]  -> [<end> -1]
[if (x)] n -> [<end> -1]

image

Captured from nomnoml.com

Thanks for the great work!

jacobsacco commented 4 years ago

This issue is pretty easy to run into, it seems. As soon as you make graphs with many elements connecting in nontrivial ways, you can start to have entire boxes cut off.

skanaar commented 3 years ago

Related to #103

A workaround for this would be to use the #gutter directive.

gutter:50

[Order]Order<-> OrderLines[Order line]

skanaar commented 3 years ago

This is now fixed on nomnoml.com and in the npm library. 👍 Thank you for reporting.

moodymudskipper commented 3 years ago

Awesome, thanks!

skanaar commented 3 years ago

This fix is making sure that edges are always within the bounding box. @jacobsacco talked about entire boxes being omitted? Do you have any examples of that?

jacobsacco commented 3 years ago

Looking back, I think I was mistaken, and it only appeared that way. Thanks for the fix!