mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-26 02:39:41 +02:00
Updated flowcharts with the new syntax
This commit is contained in:
@@ -4,6 +4,7 @@ import * as configApi from '../../config';
|
||||
import common from '../common/common';
|
||||
import mermaidAPI from '../../mermaidAPI';
|
||||
import { log } from '../../logger';
|
||||
import { setTitle, getTitle, getAccDescription, setAccDescription } from '../../commonDb';
|
||||
|
||||
const MERMAID_DOM_ID_PREFIX = 'flowchart-';
|
||||
let vertexCounter = 0;
|
||||
@@ -31,21 +32,17 @@ export const parseDirective = function (statement, context, type) {
|
||||
mermaidAPI.parseDirective(this, statement, context, type);
|
||||
};
|
||||
|
||||
const setTitle = function (txt) {
|
||||
title = sanitizeText(txt);
|
||||
};
|
||||
// const getTitle = function () {
|
||||
// return title;
|
||||
// };
|
||||
|
||||
const getTitle = function () {
|
||||
return title;
|
||||
};
|
||||
// const setAccDescription = function (txt) {
|
||||
// description = sanitizeText(txt).replace(/\n\s+/g, '\n');
|
||||
// };
|
||||
|
||||
const setAccDescription = function (txt) {
|
||||
description = sanitizeText(txt);
|
||||
};
|
||||
|
||||
const getAccDescription = function () {
|
||||
return description;
|
||||
};
|
||||
// const getAccDescription = function () {
|
||||
// return description;
|
||||
// };
|
||||
|
||||
/**
|
||||
* Function to lookup domId from id in the graph definition.
|
||||
@@ -447,6 +444,8 @@ export const clear = function (ver) {
|
||||
tooltips = [];
|
||||
firstGraphFlag = true;
|
||||
version = ver || 'gen-1';
|
||||
title = '';
|
||||
description = '';
|
||||
};
|
||||
export const setGen = (ver) => {
|
||||
version = ver || 'gen-1';
|
||||
|
Reference in New Issue
Block a user