mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-15 06:19:24 +02:00
Merge pull request #6470 from nour0205/fix/flowchart-inherit-dir
feat(flowchart): add inheritDir option for subgraph direction
This commit is contained in:
@@ -934,4 +934,43 @@ graph TD
|
||||
}
|
||||
);
|
||||
});
|
||||
it('68: should honor subgraph direction when inheritDir is false', () => {
|
||||
imgSnapshotTest(
|
||||
`
|
||||
%%{init: {"flowchart": { "inheritDir": false }}}%%
|
||||
flowchart TB
|
||||
direction LR
|
||||
subgraph A
|
||||
direction TB
|
||||
a --> b
|
||||
end
|
||||
subgraph B
|
||||
c --> d
|
||||
end
|
||||
`,
|
||||
{
|
||||
fontFamily: 'courier',
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
it('69: should inherit global direction when inheritDir is true', () => {
|
||||
imgSnapshotTest(
|
||||
`
|
||||
%%{init: {"flowchart": { "inheritDir": true }}}%%
|
||||
flowchart TB
|
||||
direction LR
|
||||
subgraph A
|
||||
direction TB
|
||||
a --> b
|
||||
end
|
||||
subgraph B
|
||||
c --> d
|
||||
end
|
||||
`,
|
||||
{
|
||||
fontFamily: 'courier',
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user