163 Commits

Author SHA1 Message Date
Chris Moran
18254392ab
Merge branch 'mermaid-js-develop' into develop 2020-06-19 13:32:23 -04:00
Knut Sveidqvist
e37c7e58cf
Merge pull request #1479 from chewnoill/chewy/cleanup-after-failed-render
cleanup helper dom elements before rendering
2020-06-19 11:29:46 +02:00
Knut Sveidqvist
44d5009538 Revert of PR #1482 2020-06-19 10:52:20 +02:00
Chris Moran
e64a65c41e
Refactored rendering sequence diagrams
Fixed default config clobbering issues
Updated/corrected sequenceDiagram.spec to set the config using mermaidAPI
Enabled freeze on mermaidAPI to protect defaultConfig
2020-06-18 08:10:50 -04:00
Chris Moran
67c2fe8005
Refactored rendering sequence diagrams
Fixed default config clobbering issues
2020-06-17 18:13:37 -04:00
will cohen
d3d15b79fb cleanup helper dom elements before rendering 2020-06-17 17:54:01 -04:00
Knut Sveidqvist
b5d457daa9 Testcommit 2020-06-15 22:26:11 +02:00
Knut Sveidqvist
603f2a2154 1473 Using setConfig instead of initialize from mermaid in some cases 2020-06-15 21:55:20 +02:00
Knut Sveidqvist
08dd2bd93d 1473 Class diagrams 2020-06-15 08:03:13 +02:00
Knut Sveidqvist
bd0210cdce 1473 Updated config handling 2020-06-15 01:11:56 +02:00
Knut Sveidqvist
5677523800 1473 Setting default config 2020-06-14 23:37:08 +02:00
Knut Sveidqvist
2150933368 Setting default config 2020-06-14 22:50:45 +02:00
Chris Moran
0ae001ed6d
Fixed issue with idea-multimarkdown.
- JavaFX does not support lookbehind
 - (?) It also appears that named regex groups are also unsupported for both mermaid and javafx

Update:
 - Fixed an issue where setLogLevel did not properly handle 'named' log levels
 - Backwards compatibility should be preserved, any/all %%{...}%% directives will be correctly processed by the grammar and properly ignored for any/all graph types that do not support them.

 - Multiline directives will render an error (as they should) if they are not accounted for in the .jison grammar
2020-06-14 11:34:39 -04:00
Chris Moran
620c894929
Fixed issue causing idea-multimarkdown headaches: util changes. Reworking them. 2020-06-14 06:53:22 -04:00
Chris Moran
04b4da0c75
## Work in progress.
Implemented directives per PR review comment:

%%{directive: json-encoded-arg-string}%%

example:

%%{init: { 'logLevel': 0, 'theme': 'dark' }}%%

Also changed wrap and config to directives:

%%{wrap}%%
%%{config: { 'fontSize': 18 }}%%
2020-06-11 15:35:00 -04:00
Chris Moran
4a253a7760
Merged with mainline develop 2020-06-08 14:58:42 -04:00
Chris Moran
bd11663e0a
Added auto wrap option (and grammar) for sequenceDiagrams
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
2020-06-08 14:48:03 -04:00
Knut Sveidqvist
db3377e170 Lint fixes 2020-06-06 12:53:19 +02:00
Knut Sveidqvist
85a8feec9d Also fix for error handling when setting mermaid.parseError 2020-06-06 12:42:35 +02:00
Knut Sveidqvist
c21b61bbd2 Bug fixes in new functionality, intersections not taken into account in nodes used by new graph engine. Graph flowchart not usable when integrating using mermaid.core. Incorrect flwochart docs 2020-05-16 19:58:22 +02:00
Knut Sveidqvist
d7d248fd04
Merge pull request #1388 from mermaid-js/1386_finetuning_rendering_engine
1386 finetuning rendering engine
2020-05-13 17:36:12 +02:00
Adrian Hall
053a86c0d4 Do explicit imports for d3 instead of wildcards 2020-05-11 07:10:04 +01:00
Knut Sveidqvist
9a3ec31191 #1386 Adding support for click events and links 2020-05-06 18:51:12 +02:00
Adrian Hall
d068a460bd Change ERD fontSize config to an integer to prevent NaN errors 2020-04-30 15:55:14 +01:00
Knut Sveidqvist
3aa5fc0cc2
Merge pull request #1365 from dany74q/feature/sequence-diagrams-improvements
Feature/sequence diagrams improvements
2020-04-26 17:21:55 +02:00
Danny Shemesh
5f6887b316 Sequence diagram fixes & improvements
This commit fixes some bugs, and I believe, improves upon the current
implementation.

In no particular order, it adds:

1. Control over note font size, family and alignment (now defaults to
center)
2. Dynamic actor resizing - actor's width will now scale if its
description is bigger than the static configured width
3. Dynamic actor margins - the margin between actors will now be
dynamically calculated by taking into account the width of connecting
messages or notes
4. Fixed a small visual annoyance where a loop arrow would intersect
with the text it loops on
5. Fixed a bug where if global config -> fontFamily wasn't defined, it
would override the actorFontFamily with an undefined
6. Removed some stale / commented out code
7. Added missing config variables to the global config object in mermaidAPI.js
8. Added messageFontSize, messageFontFamily to control message (non-note)
font settings
9. Memoized the actor widths in a pre-calculation that takes notes and
signals lengths into account
10. Removed redundant console.log lines
11. Extracted out actor width & margin calculation to getMaxMessageWidthPerActor, and
calculateActorMargins
2020-04-23 16:50:00 +03:00
Russell Geraghty
e4a2d7dfb7 Updated API 2020-04-04 17:50:02 +01:00
Knut Sveidqvist
a5af248715 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-30 19:15:17 +02:00
Adrian Hall
eee9a1661f Merge branch 'develop' into feature/1309_erDiagram_PlantUML 2020-03-29 08:55:19 +01:00
Adrian Hall
9199546dca Alter ERD syntax for compatibility with PlantUML 2020-03-29 08:42:20 +01:00
Raphael Medaer
cbdb2e6e6f
Align left/center/right multiline messages 2020-03-24 22:17:11 +01:00
Knut Sveidqvist
5b302ae2e6 #1295 Applying new rendering engine for stateDiagrams 2020-03-22 21:45:14 +01:00
Knut Sveidqvist
02b19fed27 Merge branch 'develop' into feature/1295_generic_rendering_engine 2020-03-22 14:44:43 +01:00
Adrian Hall
4f50e36e5b Tidy up for lint 2020-03-17 09:48:32 +00:00
Adrian Hall
a0bbbe1404 Merge branch 'develop' into feature/117_er_diagram 2020-03-17 09:28:10 +00:00
Adrian Hall
50f983871b Add labels to relationships (needs further tidy up) 2020-03-17 09:25:16 +00:00
Adrian Hall
1e498eccb6 Change rendering algorithm 2020-03-11 22:17:11 +00:00
Adrian Hall
bab4649a1e Use markers with rounded crows feet 2020-03-10 13:48:53 +00:00
Knut Sveidqvist
aa32d454c9 #1295 First draft of generic renderer applied to flowcharts. 2020-03-08 09:49:41 +01:00
Knut Sveidqvist
25e2d78311 #1295 Start renderer 2020-03-04 20:35:59 +01:00
Adrian Hall
1e2d014ac9 Basic rendering for ER diagrams 2020-03-03 21:44:18 +00:00
Knut Sveidqvist
89c1853977 #1261 Removed calls to console.log 2020-02-21 09:50:04 +01:00
Knut Sveidqvist
822df37f8c #1224 Possibility to style text color of nodes and subgraphs as well as apply classes to subgraphs 2020-02-05 19:39:50 +01:00
Knut Sveidqvist
4ad354a561 #1216 Fix for issue when mermaid freezes the browser tab due to large diagrams 2020-01-25 13:35:11 +01:00
Marc Faber
36f9eca33e Example 2 is not shown in mermaidAPI configuration section of the docs 2020-01-12 14:38:57 +01:00
Marc Faber
4dd90e56b1 Add docs and default values for node spacing in mermaidAPI 2020-01-12 14:09:24 +01:00
Justin Greywolf
e6fbfcb1e8 1064 Adding tooltip and function calls to click evens in class diagrams 2020-01-02 11:06:29 -08:00
Knut Sveidqvist
eec45dfff9 Merge branch 'release/8.4.3' 2019-12-01 07:52:44 +01:00
Knut Sveidqvist
cbd27831df #1078 Lint fixes 2019-11-20 19:14:32 +01:00
Knut Sveidqvist
f6028b63b6 #1078 Using the configuration of the arrowMarkerAbsolute 2019-11-20 19:06:46 +01:00