Merge branch '5237-unified-layout-common-renderer' of github.com:mermaid-js/mermaid into 5237-unified-layout-common-renderer

This commit is contained in:
Knut Sveidqvist 2024-06-20 12:48:26 +02:00
commit 1096b185ee
2 changed files with 3 additions and 2 deletions

View File

@ -152,6 +152,7 @@ let cssClasses = newClassesList(); // style classes defined by a classDef
*
* @param nodes
* @param nodeData
* @param classes
*/
function insertOrUpdateNode(nodes, nodeData, classes) {
if (!nodeData.id || nodeData.id === '</join></fork>' || nodeData.id === '</choice>') {
@ -248,7 +249,7 @@ function getClassesFromDbInfo(dbInfoItem) {
}
//add comma for all other classes
else {
classStr += dbInfoItem.classes[i] + ',';
classStr += dbInfoItem.classes[i] + ' ';
}
}
return classStr;

View File

@ -33,7 +33,7 @@ export const insertEdgeLabel = (elem, edge) => {
log.info('abc82', edge, edge.labelType);
// Create outer g, edgeLabel, this will be positioned after graph layout
const edgeLabel = elem.insert('g').attr('class', 'edgeLabel');
const edgeLabel = elem.insert('g').attr('class', 'edgeLabel').attr('data-id', edge.id);
// Create inner g, label, this will be positioned now for centering the text
const label = edgeLabel.insert('g').attr('class', 'label');