mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-18 23:09:49 +02:00
#5237 Support for invisisblwe links
This commit is contained in:
@@ -901,9 +901,12 @@ export const getData = () => {
|
||||
labelpos: 'c',
|
||||
thickness: rawEdge.stroke,
|
||||
minlen: rawEdge.length,
|
||||
classes: 'edge-thickness-normal edge-pattern-solid flowchart-link',
|
||||
arrowTypeStart,
|
||||
arrowTypeEnd,
|
||||
classes:
|
||||
rawEdge?.stroke === 'invisible'
|
||||
? ''
|
||||
: 'edge-thickness-normal edge-pattern-solid flowchart-link',
|
||||
arrowTypeStart: rawEdge?.stroke === 'invisible' ? 'none' : arrowTypeStart,
|
||||
arrowTypeEnd: rawEdge?.stroke === 'invisible' ? 'none' : arrowTypeEnd,
|
||||
arrowheadStyle: 'fill: #333',
|
||||
labelStyle: styles,
|
||||
style: styles,
|
||||
|
@@ -35,10 +35,7 @@ const rect = async (parent, node) => {
|
||||
// const text = label
|
||||
// .node()
|
||||
// .appendChild(createLabel(node.label, node.labelStyle, undefined, true));
|
||||
const text =
|
||||
node.labelType === 'markdown'
|
||||
? await createText(labelEl, node.label, { style: node.labelStyle, useHtmlLabels })
|
||||
: labelEl.node().appendChild(await createLabel(node.label, node.labelStyle, undefined, true));
|
||||
const text = await createText(labelEl, node.label, { style: node.labelStyle, useHtmlLabels });
|
||||
|
||||
// Get the size of the label
|
||||
let bbox = text.getBBox();
|
||||
|
@@ -569,7 +569,7 @@ export const insertEdge = function (elem, edge, clusterDb, diagramType, startNod
|
||||
strokeClasses = 'edge-thickness-thick';
|
||||
break;
|
||||
case 'invisible':
|
||||
strokeClasses = 'edge-thickness-thick';
|
||||
strokeClasses = 'edge-thickness-invisible';
|
||||
break;
|
||||
default:
|
||||
strokeClasses = 'edge-thickness-normal';
|
||||
|
@@ -47,7 +47,10 @@ const getStyles = (
|
||||
& .edge-pattern-solid {
|
||||
stroke-dasharray: 0;
|
||||
}
|
||||
|
||||
& .edge-thickness-invisible {
|
||||
stroke-width: 0;
|
||||
fill: none;
|
||||
}
|
||||
& .edge-pattern-dashed{
|
||||
stroke-dasharray: 3;
|
||||
}
|
||||
|
Reference in New Issue
Block a user