mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-18 03:34:12 +01:00
#3074 Cleanup and fixes for issues with accessibility for gantt and journey diagrams
This commit is contained in:
@@ -5,7 +5,7 @@ import common from '../common/common';
|
||||
import * as configApi from '../../config';
|
||||
import {
|
||||
setAccTitle,
|
||||
getTitle,
|
||||
getAccTitle,
|
||||
getAccDescription,
|
||||
setAccDescription,
|
||||
clear as commonClear,
|
||||
@@ -92,7 +92,7 @@ const extract = (_doc) => {
|
||||
// doc = root;
|
||||
// }
|
||||
log.info(doc);
|
||||
clear();
|
||||
clear(true);
|
||||
|
||||
log.info('Extract', doc);
|
||||
|
||||
@@ -171,7 +171,7 @@ export const addState = function (id, type, doc, descr, note) {
|
||||
}
|
||||
};
|
||||
|
||||
export const clear = function () {
|
||||
export const clear = function (saveCommon) {
|
||||
documents = {
|
||||
root: newDoc(),
|
||||
};
|
||||
@@ -182,7 +182,9 @@ export const clear = function () {
|
||||
startCnt = 0;
|
||||
endCnt = 0; // eslint-disable-line
|
||||
classes = [];
|
||||
commonClear();
|
||||
if (!saveCommon) {
|
||||
commonClear();
|
||||
}
|
||||
};
|
||||
|
||||
export const getState = function (id) {
|
||||
@@ -293,7 +295,7 @@ export default {
|
||||
getRootDocV2,
|
||||
extract,
|
||||
trimColon,
|
||||
getTitle,
|
||||
getAccTitle,
|
||||
setAccTitle,
|
||||
getAccDescription,
|
||||
setAccDescription,
|
||||
|
||||
Reference in New Issue
Block a user