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