#1295 Alternating graph directions for subgraphs

This commit is contained in:
Knut Sveidqvist
2020-04-26 12:57:45 +02:00
parent fd37edc53f
commit 76b4b88e4b
3 changed files with 22 additions and 10 deletions

View File

@@ -329,12 +329,14 @@ export const extractor = (graph, depth) => {
depth
);
const graphSettings = graph.graph();
const clusterGraph = new graphlib.Graph({
multigraph: true,
compound: true
})
.setGraph({
rankdir: 'TB',
rankdir: graphSettings.rankdir === 'TB' ? 'LR' : 'TB',
// Todo: set proper spacing
nodesep: 50,
ranksep: 50,