davidje13 / SequenceDiagram

Javascript tool for generating sequence diagrams from code
https://sequence.davidje13.com/
GNU Lesser General Public License v3.0
120 stars 38 forks source link

Add a sketch theme #18

Closed davidje13 closed 6 years ago

davidje13 commented 6 years ago

Ensure all rendering can be fully customised by adding a theme which renders the diagram with a sketch appearance.

theme sketch

Depends on #17

davidje13 commented 6 years ago

Beginnings of this theme have been added. Still several areas to work on:

Annoyingly this doubles the GZipped size of the library (42.2kB rather than 23.5 before; almost entirely due to the 20kB font which is now embedded). It would be nice to lazy-load this font, ideally from an external source (Google Fonts), but permissions issues mean that it is not possible to render to PNG (or reliably export as SVG) unless the font is embedded in base64. Also lazy loading would make determining when it is possible to measure text harder, possibly necessitating an asynchronous render method.

The new themes are sketch and sketch left handed (which reverses the lean direction of vertical lines to simulate a left-handed writer)