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
This commit is contained in:
Chris Moran
2020-06-17 18:14:10 -04:00
parent 67c2fe8005
commit e64a65c41e
8 changed files with 159 additions and 116 deletions

View File

@@ -6,11 +6,14 @@ export const setConfig = conf => {
};
export const getConfig = () => config;
export const reset = conf => {
Object.keys(config).forEach(key => delete config[key]);
assignWithDepth(config, conf, { clobber: true });
};
const configApi = {
setConfig,
getConfig
// get conf() {
// return config;
// }
getConfig,
reset
};
export default configApi;