mirror of
				https://github.com/mermaid-js/mermaid.git
				synced 2025-11-03 20:34:20 +01:00 
			
		
		
		
	#3192 Adding the ability to create invisible links in flowcharts(v2)
This commit is contained in:
		@@ -453,6 +453,9 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph
 | 
			
		||||
    case 'thick':
 | 
			
		||||
      strokeClasses = 'edge-thickness-thick';
 | 
			
		||||
      break;
 | 
			
		||||
    case 'invisible':
 | 
			
		||||
      strokeClasses = 'edge-thickness-thick';
 | 
			
		||||
      break;
 | 
			
		||||
    default:
 | 
			
		||||
      strokeClasses = '';
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -677,6 +677,10 @@ const destructEndLink = (_str) => {
 | 
			
		||||
    stroke = 'thick';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  if (line[0] === '~') {
 | 
			
		||||
    stroke = 'invisible';
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  let dots = countChar('.', line);
 | 
			
		||||
 | 
			
		||||
  if (dots) {
 | 
			
		||||
 
 | 
			
		||||
@@ -280,6 +280,11 @@ export const addEdges = function (edges, g, diagObj) {
 | 
			
		||||
        edgeData.pattern = 'solid';
 | 
			
		||||
        edgeData.style = 'stroke-width: 3.5px;fill:none;';
 | 
			
		||||
        break;
 | 
			
		||||
      case 'invisible':
 | 
			
		||||
        edgeData.thickness = 'invisible';
 | 
			
		||||
        edgeData.pattern = 'solid';
 | 
			
		||||
        edgeData.style = 'stroke-width: 0;fill:none;';
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
    if (edge.style !== undefined) {
 | 
			
		||||
      const styles = getStylesFromArray(edge.style);
 | 
			
		||||
 
 | 
			
		||||
@@ -121,6 +121,7 @@ that id.
 | 
			
		||||
\s*[xo<]?\-\-+[-xo>]\s*     return 'LINK';
 | 
			
		||||
\s*[xo<]?\=\=+[=xo>]\s*     return 'LINK';
 | 
			
		||||
\s*[xo<]?\-?\.+\-[xo>]?\s*  return 'LINK';
 | 
			
		||||
\s*\~\~[\~]+\s*  return 'LINK';
 | 
			
		||||
\s*[xo<]?\-\-\s*            return 'START_LINK';
 | 
			
		||||
\s*[xo<]?\=\=\s*            return 'START_LINK';
 | 
			
		||||
\s*[xo<]?\-\.\s*            return 'START_LINK';
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user