skanaar / nomnoml

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

Support SVG dashed lines #84

Closed ronkok closed 5 years ago

ronkok commented 5 years ago

This PR amends nomnoml SVG output and adds a stroke-dasharray attribute when the input calls for a "dashed" element.

skanaar commented 5 years ago

Thanks for the pull request! Love it when I get help on this project.

I have some vague memory of browser compatibility issues relating to dashed svg shapes. I'll have a look at it and return to this.

Unfortunately this commit sort of breaks the encapsulation of the canvas and svg modules. I would prefer if renderer.js is oblivious to if it is rendering to a canvas or to an svg.

ronkok commented 5 years ago

I would prefer if renderer.js is oblivious to if it is rendering to a canvas or to an svg.

Ah yes, of course. What you have is very clean. I'll change this PR to work the same way.

ronkok commented 5 years ago

There. The canvas and SVG modules are once again encapsulated. This should be good to go.

skanaar commented 5 years ago

Nice!