mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-04 04:44:08 +01:00 
			
		
		
		
	This commit is contained in:
		@@ -22,29 +22,33 @@
 | 
			
		||||
  <body>
 | 
			
		||||
    <h1>info below</h1>
 | 
			
		||||
    <div class="flex">
 | 
			
		||||
      <div class="mermaid2" style="width: 50%; height: 400px;">
 | 
			
		||||
flowchart TD
 | 
			
		||||
  subgraph  main
 | 
			
		||||
    subgraph subcontainer
 | 
			
		||||
      subcontainer-child
 | 
			
		||||
    end
 | 
			
		||||
     subcontainer-child--> subcontainer-sibling
 | 
			
		||||
      <div class="mermaid" style="width: 50%; height: 400px;">
 | 
			
		||||
graph TD
 | 
			
		||||
  A[Christmas] -->|Get money| B(Go shopping)
 | 
			
		||||
  subgraph T ["Test"]
 | 
			
		||||
    A
 | 
			
		||||
    B
 | 
			
		||||
  end
 | 
			
		||||
  classDef Test fill:#F84E68,stroke:#333,color:white;
 | 
			
		||||
  class A,T Test
 | 
			
		||||
  classDef TestSub fill:green;
 | 
			
		||||
  class T TestSub
 | 
			
		||||
  linkStyle 0 color:orange, stroke: orange;
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="mermaid" style="width: 50%; height: 400px;">
 | 
			
		||||
flowchart TB
 | 
			
		||||
    b-->B
 | 
			
		||||
    a-->c
 | 
			
		||||
    subgraph B
 | 
			
		||||
      c
 | 
			
		||||
    end
 | 
			
		||||
    subgraph A
 | 
			
		||||
        a
 | 
			
		||||
        b
 | 
			
		||||
        B
 | 
			
		||||
    end
 | 
			
		||||
flowchart TD
 | 
			
		||||
  A[Christmas] -->|Get money| B(Go shopping)
 | 
			
		||||
  subgraph T ["Test"]
 | 
			
		||||
    A
 | 
			
		||||
    B
 | 
			
		||||
  end
 | 
			
		||||
  classDef Test fill:#F84E68,stroke:#333,color:white;
 | 
			
		||||
  class A,T Test
 | 
			
		||||
  classDef TestSub fill:green;
 | 
			
		||||
  class T TestSub
 | 
			
		||||
  linkStyle 0 color:orange, stroke: orange;
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="mermaid" style="width: 50%; height: 20%;">
 | 
			
		||||
      <div class="mermaid2" style="width: 50%; height: 20%;">
 | 
			
		||||
        flowchart TB
 | 
			
		||||
subgraph A
 | 
			
		||||
a -->b
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@ const rect = (parent, node) => {
 | 
			
		||||
  // Add outer g element
 | 
			
		||||
  const shapeSvg = parent
 | 
			
		||||
    .insert('g')
 | 
			
		||||
    .attr('class', 'cluster')
 | 
			
		||||
    .attr('class', 'cluster' + (node.class ? ' ' + node.class : ''))
 | 
			
		||||
    .attr('id', node.id);
 | 
			
		||||
 | 
			
		||||
  // add the rect
 | 
			
		||||
 
 | 
			
		||||
@@ -86,7 +86,8 @@ const createLabel = (_vertexText, style, isTitle, isNode) => {
 | 
			
		||||
      label: vertexText.replace(
 | 
			
		||||
        /fa[lrsb]?:fa-[\w-]+/g,
 | 
			
		||||
        s => `<i class='${s.replace(':', ' ')}'></i>`
 | 
			
		||||
      )
 | 
			
		||||
      ),
 | 
			
		||||
      labelStyle: style.replace('fill:', 'color:')
 | 
			
		||||
    };
 | 
			
		||||
    let vertexNode = addHtmlLabel(node);
 | 
			
		||||
    // vertexNode.parentNode.removeChild(vertexNode);
 | 
			
		||||
 
 | 
			
		||||
@@ -387,7 +387,8 @@ export const insertEdge = function(elem, e, edge, clusterDb, diagramType, graph)
 | 
			
		||||
    .append('path')
 | 
			
		||||
    .attr('d', lineFunction(lineData))
 | 
			
		||||
    .attr('id', edge.id)
 | 
			
		||||
    .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''));
 | 
			
		||||
    .attr('class', ' ' + strokeClasses + (edge.classes ? ' ' + edge.classes : ''))
 | 
			
		||||
    .attr('style', edge.style);
 | 
			
		||||
 | 
			
		||||
  // DEBUG code, adds a red circle at each edge coordinate
 | 
			
		||||
  // edge.points.forEach(point => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user