mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-25 10:20:06 +02:00
Updated pie parsing with the new syntax + fix for flowDb
This commit is contained in:
@@ -4,7 +4,13 @@ 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';
|
||||
import {
|
||||
setTitle,
|
||||
getTitle,
|
||||
getAccDescription,
|
||||
setAccDescription,
|
||||
clear as commonClear,
|
||||
} from '../../commonDb';
|
||||
|
||||
const MERMAID_DOM_ID_PREFIX = 'flowchart-';
|
||||
let vertexCounter = 0;
|
||||
@@ -18,8 +24,6 @@ let tooltips = {};
|
||||
let subCount = 0;
|
||||
let firstGraphFlag = true;
|
||||
let direction;
|
||||
let title = 'Flow chart';
|
||||
let description = '';
|
||||
|
||||
let version; // As in graph
|
||||
|
||||
@@ -32,18 +36,6 @@ export const parseDirective = function (statement, context, type) {
|
||||
mermaidAPI.parseDirective(this, statement, context, type);
|
||||
};
|
||||
|
||||
// const getTitle = function () {
|
||||
// return title;
|
||||
// };
|
||||
|
||||
// const setAccDescription = function (txt) {
|
||||
// description = sanitizeText(txt).replace(/\n\s+/g, '\n');
|
||||
// };
|
||||
|
||||
// const getAccDescription = function () {
|
||||
// return description;
|
||||
// };
|
||||
|
||||
/**
|
||||
* Function to lookup domId from id in the graph definition.
|
||||
*
|
||||
@@ -444,8 +436,7 @@ export const clear = function (ver) {
|
||||
tooltips = [];
|
||||
firstGraphFlag = true;
|
||||
version = ver || 'gen-1';
|
||||
title = '';
|
||||
description = '';
|
||||
commonClear();
|
||||
};
|
||||
export const setGen = (ver) => {
|
||||
version = ver || 'gen-1';
|
||||
|
Reference in New Issue
Block a user