Merge remote-tracking branch 'os_repo/5237-unified-layout-common-renderer' into alanaV11

This commit is contained in:
Knut Sveidqvist
2024-06-11 14:48:03 +02:00
3 changed files with 21 additions and 21 deletions

View File

@@ -96,7 +96,7 @@ end
</pre
>
<pre id="diagram" class="mermaid">
flowchart LR
flowchart RL
subgraph Apa["Apa"]
subgraph Gorilla
A["Start"]
@@ -211,12 +211,12 @@ flowchart
if_state --> True : if n >= 0
</pre
>
<pre id="diagram" class="mermaid2">
<pre id="diagram" class="mermaid">
%%{init: {"layout": "dagre", "mergeEdges": true} }%%
stateDiagram
direction TB
State T1 {
T11 --> T12
T12--> T11
}
T1 --> T2
T11 --> T2
@@ -232,16 +232,17 @@ State T1 {
}
</pre
>
<pre id="diagram" class="mermaid2">
%%{init: {"layout": "elk", "mergeEdges": true} }%%
stateDiagram
direction TB
State T1 {
T11
<pre id="diagram" class="mermaid">
%%{init: {"layouts": "elk2", "mergeEdges": true} }%%
stateDiagram
State S1 {
direction TB
S11
}
S1 --> S2
</pre
>
<pre id="diagram" class="mermaid2">
<pre id="diagram" class="mermaid">
%%{init: {"layout": "elk", "mergeEdges": true} }%%
stateDiagram
State T1 {
@@ -251,7 +252,7 @@ State T1 {
}
</pre
>
<pre id="diagram" class="mermaid2">
<pre id="diagram" class="mermaid">
%%{init: {"layout": "elk", "mergeEdges": true} }%%
stateDiagram
[*] --> T1
@@ -305,7 +306,7 @@ stateDiagram-v2
// handdrawnSeed: 12,
// look: 'handdrawn',
// 'elk.nodePlacement.strategy': 'NETWORK_SIMPLEX',
// layout: 'dagre',
layout: 'dagre',
// layout: 'elk',
// layout: 'fixed',
// htmlLabels: false,

View File

@@ -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,

View File

@@ -273,7 +273,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 = {
@@ -281,10 +280,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;
}
@@ -292,7 +291,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 {
@@ -347,7 +346,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;