diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index fb2fe7f9b..83472039d 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -57,22 +57,28 @@
Security check
 flowchart LR
-    subgraph external
-      subgraph internal
-          inside
-      end
+    %% Actors
+    A
+    subgraph Sub
+        B --> C
     end
-    outside --> inside
+
+    %% Accusations
+    A --L --> Sub
+
+    %% Offense
+    B --> A
+
     
-flowchart LR
-    subgraph parent
-      subgraph childB
-        grandchild
-      end
-    end
-    foo --> childA        
+ stateDiagram-v2 + + [*] --> S1 + S1 --> S2: long line using
should work + S1 --> S3: long line using
should work + S1 --> S4: long line using \\nshould work + +
       gantt
         title Style today marker (vertical line should be 5px wide and half-transparent blue)
diff --git a/packages/mermaid/src/dagre-wrapper/edges.js b/packages/mermaid/src/dagre-wrapper/edges.js
index 5213d0684..bb22cee83 100644
--- a/packages/mermaid/src/dagre-wrapper/edges.js
+++ b/packages/mermaid/src/dagre-wrapper/edges.js
@@ -130,9 +130,21 @@ export const positionEdgeLabel = (edge, paths) => {
     if (path) {
       //   // debugger;
       const pos = utils.calcLabelPosition(path);
-      log.info('Moving label from (', x, ',', y, ') to (', pos.x, ',', pos.y, ') abc78');
-      // x = pos.x;
-      // y = pos.y;
+      log.info(
+        'Moving label ' + edge.label + ' from (',
+        x,
+        ',',
+        y,
+        ') to (',
+        pos.x,
+        ',',
+        pos.y,
+        ') abc78'
+      );
+      if (paths.updatedPath) {
+        x = pos.x;
+        y = pos.y;
+      }
     }
     el.attr('transform', 'translate(' + x + ', ' + y + ')');
   }
@@ -463,7 +475,7 @@ export const insertEdge = function (elem, e, edge, clusterDb, diagramType, graph
     .attr('style', edge.style);
 
   // DEBUG code, adds a red circle at each edge coordinate
-  // edge.points.forEach(point => {
+  // edge.points.forEach((point) => {
   //   elem
   //     .append('circle')
   //     .style('stroke', 'red')