mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-11 03:19:42 +02:00
Merge pull request #1741 from mermaid-js/1740_nested_subgraps_directions
1740 nested subgraps directions
This commit is contained in:
@@ -313,6 +313,22 @@ end
|
|||||||
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
|
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
it('57.x: handle nested subgraphs with outgoing links 5', () => {
|
||||||
|
imgSnapshotTest(
|
||||||
|
`%% this does not produce the desired result
|
||||||
|
flowchart TB
|
||||||
|
subgraph container_Beta
|
||||||
|
process_C-->Process_D
|
||||||
|
end
|
||||||
|
subgraph container_Alpha
|
||||||
|
process_A-->process_B
|
||||||
|
process_B-->|via_AWSBatch|container_Beta
|
||||||
|
process_A-->|messages|process_C
|
||||||
|
end
|
||||||
|
`,
|
||||||
|
{htmlLabels: true, flowchart: {htmlLabels: true}, securityLevel: 'loose'}
|
||||||
|
);
|
||||||
|
});
|
||||||
it('58: handle styling with style expressions', () => {
|
it('58: handle styling with style expressions', () => {
|
||||||
imgSnapshotTest(
|
imgSnapshotTest(
|
||||||
`
|
`
|
||||||
|
@@ -235,7 +235,7 @@ export const intersection = (node, outsidePoint, insidePoint) => {
|
|||||||
r = (R * q) / Q;
|
r = (R * q) / Q;
|
||||||
const res = {
|
const res = {
|
||||||
x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - r,
|
x: insidePoint.x < outsidePoint.x ? insidePoint.x + R - r : insidePoint.x - r,
|
||||||
y: outsidePoint.y + q
|
y: insidePoint.y < outsidePoint.y ? insidePoint.y + Q - q : insidePoint.y - q
|
||||||
};
|
};
|
||||||
logger.warn(`topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
|
logger.warn(`topp/bott calc, Q ${Q}, q ${q}, R ${R}, r ${r}`, res);
|
||||||
|
|
||||||
|
@@ -42,7 +42,8 @@ describe('Graphlib decorations', () => {
|
|||||||
}
|
}
|
||||||
const int = intersection(node2, o, i);
|
const int = intersection(node2, o, i);
|
||||||
expect(int.x).toBeCloseTo(127.39979619565217)
|
expect(int.x).toBeCloseTo(127.39979619565217)
|
||||||
expect(int.y).toBeCloseTo(76)
|
// expect(int.y).toBeCloseTo(76)
|
||||||
|
expect(int.y).toBeCloseTo(67.833)
|
||||||
|
|
||||||
});
|
});
|
||||||
it('case 4 - intersection on top of box inside point greater then inside point', function () {
|
it('case 4 - intersection on top of box inside point greater then inside point', function () {
|
||||||
@@ -56,7 +57,8 @@ describe('Graphlib decorations', () => {
|
|||||||
}
|
}
|
||||||
const int = intersection(node2, o, i);
|
const int = intersection(node2, o, i);
|
||||||
expect(int.x).toBeCloseTo(167.9232336956522)
|
expect(int.x).toBeCloseTo(167.9232336956522)
|
||||||
expect(int.y).toBeCloseTo(76)
|
// expect(int.y).toBeCloseTo(76)
|
||||||
|
expect(int.y).toBeCloseTo(67.833)
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user