From 38efaf93c86b173470e2afb9ffaaecb231fe48b9 Mon Sep 17 00:00:00 2001 From: raghvendra Date: Sat, 29 Apr 2023 16:06:17 +0530 Subject: [PATCH] updating es6 rules in flowchart diagram --- .../mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js | 6 +++--- packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js | 6 +++--- packages/mermaid/src/diagrams/flowchart/flowRenderer.js | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js index 66eece46d..6a90c46f5 100644 --- a/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js +++ b/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js @@ -414,7 +414,7 @@ export const addEdges = function (edges, diagObj, graph, svg) { edges.forEach(function (edge) { // Identify Link - var linkIdBase = 'L-' + edge.start + '-' + edge.end; + const linkIdBase = 'L-' + edge.start + '-' + edge.end; // count the links from+to the same node to give unique id if (linkIdCnt[linkIdBase] === undefined) { linkIdCnt[linkIdBase] = 0; @@ -425,8 +425,8 @@ export const addEdges = function (edges, diagObj, graph, svg) { } let linkId = linkIdBase + '-' + linkIdCnt[linkIdBase]; log.info('abc78 new link id to be used is', linkIdBase, linkId, linkIdCnt[linkIdBase]); - var linkNameStart = 'LS-' + edge.start; - var linkNameEnd = 'LE-' + edge.end; + const linkNameStart = 'LS-' + edge.start; + const linkNameEnd = 'LE-' + edge.end; const edgeData = { style: '', labelStyle: '' }; edgeData.minlen = edge.length || 1; diff --git a/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js b/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js index 0b8d47543..23f94942c 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js +++ b/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js @@ -214,7 +214,7 @@ export const addEdges = function (edges, g, diagObj) { cnt++; // Identify Link - var linkIdBase = 'L-' + edge.start + '-' + edge.end; + const linkIdBase = 'L-' + edge.start + '-' + edge.end; // count the links from+to the same node to give unique id if (linkIdCnt[linkIdBase] === undefined) { linkIdCnt[linkIdBase] = 0; @@ -225,8 +225,8 @@ export const addEdges = function (edges, g, diagObj) { } let linkId = linkIdBase + '-' + linkIdCnt[linkIdBase]; log.info('abc78 new link id to be used is', linkIdBase, linkId, linkIdCnt[linkIdBase]); - var linkNameStart = 'LS-' + edge.start; - var linkNameEnd = 'LE-' + edge.end; + const linkNameStart = 'LS-' + edge.start; + const linkNameEnd = 'LE-' + edge.end; const edgeData = { style: '', labelStyle: '' }; edgeData.minlen = edge.length || 1; diff --git a/packages/mermaid/src/diagrams/flowchart/flowRenderer.js b/packages/mermaid/src/diagrams/flowchart/flowRenderer.js index 575706935..f69fe93eb 100644 --- a/packages/mermaid/src/diagrams/flowchart/flowRenderer.js +++ b/packages/mermaid/src/diagrams/flowchart/flowRenderer.js @@ -176,9 +176,9 @@ export const addEdges = function (edges, g, diagObj) { cnt++; // Identify Link - var linkId = 'L-' + edge.start + '-' + edge.end; - var linkNameStart = 'LS-' + edge.start; - var linkNameEnd = 'LE-' + edge.end; + const linkId = 'L-' + edge.start + '-' + edge.end; + const linkNameStart = 'LS-' + edge.start; + const linkNameEnd = 'LE-' + edge.end; const edgeData = {};