It's a little hard to style the current ERDs. This aims to make things
easier by associating a distinct class with each type of element within
the diagram.
I've added a common `er` class across the elements so that those that
bring their own `themeCSS` can target styles at this diagram type. This
hasn't really been done elsewhere so I'm open to suggestions; an
alternative may be to add classes to a top-level element so that we can
do e.g. `svg.mermaid.er .entityBox`.
This restores the option of rendering an ERD with an absolute width,
which is consistent with the approach taken with the other diagram
types.
This logic was lost in #1324, which was probably just a small oversight:
9199546dca (diff-7c38d27acbe0676d923bf19283671616L397-L409)
The option defaults to true for backwards compatibility.
This option lets you customise the padding around the whole flowchart.
It is equivalent to `er.diagramPadding` and defaults to 8px for
backwards compatibility with the current hardcoded value.
Updated config to match a conversation knut and i had about the relationship between global, site, and integrator configuration
(Will update docs)
Renamed wrapEnabled to wrap
Poor man's caching for calculateTextDimensions, wrapLabel, and breakString (actually makes a huge difference)
-added a few workarounds, I found for writing "end" as a node name alongside the workaround found in the FAQ.
-also made a few minor edits to the contents.
Added inline config and init(ialization) grammar
Added reinitialize functionality to mermaidAPI (not to be confused with initialize)
Added actorFontWeight, noteFontWeight, messageFontWeight, wrapEnabled, wrapPadding
Added wrapLabel and breakWord functions to intelligently wrap text based on a pixel-based width instead of column-based
- The implementation is largely from Carys Mills: https://medium.com/@CarysMills/wrapping-svg-text-without-svg-2-ecbfb58f7ba4
- Made slight modifications for mermaid-js
Fixed dark theme color inconsistencies for sequence diagrams
Removed !important from sequence scss as this prevents any client overrides
Fixed various invalid css values in sequence scss which prevented proper rendering of various elements
Added detectInit to utils for initialization json detection
Updated detectType to support the existence or absence of the intialization configuration
Updated calculateTextWidth to include fontWeight