mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-28 07:03:17 +08:00
(minor) add comments, remove duplicated line
This commit is contained in:
parent
345eaade22
commit
9996e53e24
@ -31,8 +31,13 @@ const FILL_KEYWORD = 'fill';
|
|||||||
const BG_FILL = 'bgFill';
|
const BG_FILL = 'bgFill';
|
||||||
const STYLECLASS_SEP = ',';
|
const STYLECLASS_SEP = ',';
|
||||||
|
|
||||||
// Returns a new list of classes.
|
/**
|
||||||
// In the future, this can be replaced with a class common to all diagrams.
|
* Returns a new list of classes.
|
||||||
|
* In the future, this can be replaced with a class common to all diagrams.
|
||||||
|
* ClassDef information = { id: id, styles: [], textStyles: [] }
|
||||||
|
*
|
||||||
|
* @return {{}}
|
||||||
|
*/
|
||||||
function newClassesList() {
|
function newClassesList() {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
@ -276,8 +281,6 @@ export const clear = function (saveCommon) {
|
|||||||
};
|
};
|
||||||
currentDocument = documents.root;
|
currentDocument = documents.root;
|
||||||
|
|
||||||
currentDocument = documents.root;
|
|
||||||
|
|
||||||
// number of start and end nodes; used to construct ids
|
// number of start and end nodes; used to construct ids
|
||||||
startEndCount = 0;
|
startEndCount = 0;
|
||||||
classes = newClassesList();
|
classes = newClassesList();
|
||||||
@ -453,7 +456,7 @@ const getDividerId = () => {
|
|||||||
export const addStyleClass = function (id, styleAttributes = '') {
|
export const addStyleClass = function (id, styleAttributes = '') {
|
||||||
// create a new style class object with this id
|
// create a new style class object with this id
|
||||||
if (typeof classes[id] === 'undefined') {
|
if (typeof classes[id] === 'undefined') {
|
||||||
classes[id] = { id: id, styles: [], textStyles: [] };
|
classes[id] = { id: id, styles: [], textStyles: [] }; // This is a classDef
|
||||||
}
|
}
|
||||||
const foundClass = classes[id];
|
const foundClass = classes[id];
|
||||||
if (typeof styleAttributes !== 'undefined') {
|
if (typeof styleAttributes !== 'undefined') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user