mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-11-15 18:24:33 +01:00
Merge branch '5237-unified-layout-common-renderer' of github.com:mermaid-js/mermaid into alanaV11
This commit is contained in:
@@ -206,8 +206,20 @@ function getClassesFromDbInfo(dbInfoItem) {
|
|||||||
if (dbInfoItem === undefined || dbInfoItem === null) {
|
if (dbInfoItem === undefined || dbInfoItem === null) {
|
||||||
return '';
|
return '';
|
||||||
} else {
|
} else {
|
||||||
if (dbInfoItem.cssClasses) {
|
if (dbInfoItem.classes) {
|
||||||
return dbInfoItem.cssClasses.join(' ');
|
let classStr = '';
|
||||||
|
// for each class in classes, add it to the string as comma separated
|
||||||
|
for (let i = 0; i < dbInfoItem.classes.length; i++) {
|
||||||
|
//do not add comma for the last class
|
||||||
|
if (i === dbInfoItem.classes.length - 1) {
|
||||||
|
classStr += dbInfoItem.classes[i];
|
||||||
|
}
|
||||||
|
//add comma for all other classes
|
||||||
|
else {
|
||||||
|
classStr += dbInfoItem.classes[i] + ',';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return classStr;
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
@@ -224,7 +236,7 @@ export const dataFetcher = (
|
|||||||
look
|
look
|
||||||
) => {
|
) => {
|
||||||
const itemId = parsedItem.id;
|
const itemId = parsedItem.id;
|
||||||
const classStr = getClassesFromDbInfo(diagramStates[itemId]);
|
const classStr = getClassesFromDbInfo(diagramStates.get(itemId));
|
||||||
|
|
||||||
if (itemId !== 'root') {
|
if (itemId !== 'root') {
|
||||||
let shape = SHAPE_STATE;
|
let shape = SHAPE_STATE;
|
||||||
@@ -344,6 +356,7 @@ export const dataFetcher = (
|
|||||||
padding: 0, //getConfig().flowchart.padding
|
padding: 0, //getConfig().flowchart.padding
|
||||||
useRough,
|
useRough,
|
||||||
look,
|
look,
|
||||||
|
position: parsedItem.note.position,
|
||||||
};
|
};
|
||||||
const groupData = {
|
const groupData = {
|
||||||
labelStyle: '',
|
labelStyle: '',
|
||||||
@@ -358,6 +371,7 @@ export const dataFetcher = (
|
|||||||
padding: 16, //getConfig().flowchart.padding
|
padding: 16, //getConfig().flowchart.padding
|
||||||
useRough,
|
useRough,
|
||||||
look,
|
look,
|
||||||
|
position: parsedItem.note.position,
|
||||||
};
|
};
|
||||||
graphItemCount++;
|
graphItemCount++;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user