mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-27 03:09:43 +02:00
Fix for multi-line row issue and failsafe for edge style for stroke not present
This commit is contained in:
@@ -521,7 +521,7 @@ export const insertEdge = function (elem, edge, clusterDb, diagramType, startNod
|
||||
let svgPath;
|
||||
let linePath = lineFunction(lineData);
|
||||
const edgeStyles = Array.isArray(edge.style) ? edge.style : [edge.style];
|
||||
let strokeColor = edgeStyles.find((style) => style.startsWith('stroke:'));
|
||||
let strokeColor = edgeStyles.find((style) => style?.startsWith('stroke:'));
|
||||
|
||||
if (edge.look === 'handDrawn') {
|
||||
const rc = rough.svg(elem);
|
||||
|
@@ -233,6 +233,10 @@ export async function erBox<T extends SVGGraphicsElement>(parent: D3Selection<T>
|
||||
yOffsets.push(0);
|
||||
// Draw row rects
|
||||
for (const [i, yOffset] of yOffsets.entries()) {
|
||||
if (i === 0 && yOffsets.length > 1) {
|
||||
continue;
|
||||
// Skip first row
|
||||
}
|
||||
const isEven = i % 2 === 0 && yOffset !== 0;
|
||||
const roughRect = rc.rectangle(x, nameBBox.height + y + yOffset, w, nameBBox.height, {
|
||||
...options,
|
||||
|
Reference in New Issue
Block a user