mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-22 16:59:48 +02:00
#1418 Fix for descriptions in states
This commit is contained in:
@@ -148,6 +148,12 @@ export const clear = function() {
|
||||
root: newDoc()
|
||||
};
|
||||
currentDocument = documents.root;
|
||||
|
||||
currentDocument = documents.root;
|
||||
|
||||
startCnt = 0;
|
||||
endCnt = 0; // eslint-disable-line
|
||||
classes = [];
|
||||
};
|
||||
|
||||
export const getState = function(id) {
|
||||
@@ -213,7 +219,7 @@ const getDividerId = () => {
|
||||
return 'divider-id-' + dividerCnt;
|
||||
};
|
||||
|
||||
const classes = [];
|
||||
let classes = [];
|
||||
|
||||
const getClasses = () => classes;
|
||||
|
||||
|
@@ -15,7 +15,7 @@ export const setConf = function(cnf) {
|
||||
}
|
||||
};
|
||||
|
||||
const nodeDb = {};
|
||||
let nodeDb = {};
|
||||
|
||||
/**
|
||||
* Returns the all the styles from classDef statements in the graph definition.
|
||||
@@ -203,6 +203,7 @@ const setupDoc = (g, parent, doc, altFlag) => {
|
||||
export const draw = function(text, id) {
|
||||
logger.info('Drawing state diagram (v2)', id);
|
||||
stateDb.clear();
|
||||
nodeDb = {};
|
||||
const parser = state.parser;
|
||||
parser.yy = stateDb;
|
||||
|
||||
|
Reference in New Issue
Block a user