diff --git a/cypress/platform/knsv2.html b/cypress/platform/knsv2.html index 2837952f7..260d540d3 100644 --- a/cypress/platform/knsv2.html +++ b/cypress/platform/knsv2.html @@ -96,7 +96,7 @@ end
-flowchart LR +flowchart RL subgraph Apa["Apa"] subgraph Gorilla A["Start"] @@ -200,12 +200,12 @@ flowchart LR if_state --> True : if n >= 0-
+%%{init: {"layout": "dagre", "mergeEdges": true} }%% stateDiagram direction TB State T1 { - T11 --> T12 + T12--> T11 } T1 --> T2 T11 --> T2 @@ -221,16 +221,17 @@ State T1 { }-- %%{init: {"layout": "elk", "mergeEdges": true} }%% -stateDiagram - direction TB - State T1 { - T11 ++ %%{init: {"layouts": "elk2", "mergeEdges": true} }%% + stateDiagram + State S1 { + direction TB + S11 } + S1 --> S2-+%%{init: {"layout": "elk", "mergeEdges": true} }%% stateDiagram State T1 { @@ -240,7 +241,7 @@ State T1 { }-+%%{init: {"layout": "elk", "mergeEdges": true} }%% stateDiagram [*] --> T1 @@ -294,7 +295,7 @@ stateDiagram-v2 // handdrawnSeed: 12, // look: 'handdrawn', // 'elk.nodePlacement.strategy': 'NETWORK_SIMPLEX', - // layout: 'dagre', + layout: 'dagre', // layout: 'elk', // layout: 'fixed', // htmlLabels: false, diff --git a/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js b/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js index 0237e20b8..f8becf61e 100644 --- a/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js +++ b/packages/mermaid/src/rendering-util/layout-algorithms/dagre/index.js @@ -162,7 +162,7 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit node.x -= 8; log.info( - 'A tainted cluster node XBX', + 'A pure cluster node XBX', v, node.id, node.width, @@ -188,7 +188,7 @@ const recursiveRender = async (_elem, graph, diagramType, id, parentCluster, sit // A cluster in the non-recursive way log.info( - 'A pure cluster node with children XBX', + 'A tainted cluster node with children XBX', v, node.id, node.width, diff --git a/packages/mermaid/src/rendering-util/rendering-elements/edges.js b/packages/mermaid/src/rendering-util/rendering-elements/edges.js index cf1da0909..b1db4f355 100644 --- a/packages/mermaid/src/rendering-util/rendering-elements/edges.js +++ b/packages/mermaid/src/rendering-util/rendering-elements/edges.js @@ -272,7 +272,6 @@ export const intersection = (node, outsidePoint, insidePoint) => { // log.warn(); if (Math.abs(y - outsidePoint.y) * w > Math.abs(x - outsidePoint.x) * h) { // Intersection is top or bottom of rect. - // let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; let q = insidePoint.y < outsidePoint.y ? outsidePoint.y - h - y : y - h - outsidePoint.y; r = (R * q) / Q; const res = { @@ -280,10 +279,10 @@ export const intersection = (node, outsidePoint, insidePoint) => { y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - Q + q, }; - if (r === 0) { - res.x = outsidePoint.x; - res.y = outsidePoint.y; - } + // if (r === 0) { + // res.x = outsidePoint.x; + // res.y = outsidePoint.y; + // } if (R === 0) { res.x = outsidePoint.x; } @@ -291,7 +290,7 @@ export const intersection = (node, outsidePoint, insidePoint) => { res.y = outsidePoint.y; } - log.warn(`abc89 top/bot calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res); + log.warn(`abc89 top/bot calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res, 'apa'); return res; } else { @@ -346,7 +345,7 @@ const cutPathAtIntersect = (_points, boundaryNode) => { // Calc the intersection coord between the point anf the last point outside the rect const inter = intersection(boundaryNode, lastPointOutside, point); log.warn('abc88 inside', point, lastPointOutside, inter); - log.warn('abc88 intersection', inter); + log.warn('abc88 intersection', inter, boundaryNode); // // Check case where the intersection is the same as the last point let pointPresent = false;