From 3f8eb8cb6b178ee1ba404d5bdacf7edb19e85767 Mon Sep 17 00:00:00 2001 From: Neil Cuzon <58763315+NeilCuzon@users.noreply.github.com> Date: Thu, 9 Jul 2020 04:46:55 -0700 Subject: [PATCH] Update 8.6.0_docs.md --- docs/8.6.0_docs.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/8.6.0_docs.md b/docs/8.6.0_docs.md index 97ae2592e..370080e4b 100644 --- a/docs/8.6.0_docs.md +++ b/docs/8.6.0_docs.md @@ -1,4 +1,5 @@ # Version 8.6.0 Changes +**Edit this Page** [![N|Solid](https://github.com/NeilCuzon/mermaid/blob/develop/docs/img/GitHub-Mark-32px.png)](https://github.com/NeilCuzon/mermaid/edit/develop/docs/8.6.0_docs.md) With version 8.6.0 comes the release of directives for mermaid and a new system for configurations, with the aim of establishing centralized, sane defaults and simple implementation. @@ -33,6 +34,7 @@ default values for the **secure array** consists of: ['secure', 'securityLevel', # Modifying Configurations and directives: The Two types of directives: are “init” or “initialize” and “wrap”, or “wrapping”. + **Notes**: All directives are enclosed in %%{ }%%. Older versions of mermaid will not parse directives because %% will comment out the directive. @@ -62,9 +64,14 @@ When deployed within code, init is called before the graph/diagram description. # Wrap Wrap is a function that is currently only deployable for sequence diagrams. It is a non-argument directive and can be executed thusly: -%%{wrap}%% +%%{wrap}%%. -**Notes**: wrap respects manually added
so if the user wants to break up their text, they have full control over those breaks by adding their own
tags. +**for example**: + +![Image showing wrapped text](https://github.com/NeilCuzon/mermaid/blob/develop/docs/img/wrapped%20text.png) + + +**Notes**: wrap respects manually added "
" so if the user wants to break up their text, they have full control over those breaks by adding their own "
" tags. # Resetting Configurations: @@ -80,9 +87,16 @@ There are two more functions in the mermaidAPI that can be called by site owners • **memoize**: simple caching for computationally expensive functions. It reduces the rendering time for computationally intensive diagrams by about 90%. • **assignWithDepth** - this is an improvement on previous functions with config.js and Object.assign. The purpose of this function is to provide a sane mechanism for merging objects, similar to object.assign, but with depth. + Example of **assignWithDepth**: +![Image showing assignWithDepth](https://github.com/NeilCuzon/mermaid/blob/develop/docs/img/assignWithDepth.png) + + Example of **object.Assign**: + +![Image showing object.assign without depth](https://github.com/NeilCuzon/mermaid/blob/develop/docs/img/object.assign%20without%20depth.png) + • **calculateTextDimensions, calculateTextWidth,** and **calculateTextHeight** - for measuring text dimensions, width and height. **Notes**:For more information on usage, parameters, and return info for these new functions take a look at the jsdocs for them in the utils package.