mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-13 02:59:36 +02:00
#2050 Adding possibility to render subgrapgs in different directions
This commit is contained in:
@@ -147,6 +147,7 @@ export const addVertices = function(vert, g, svgId) {
|
||||
domId: flowDb.lookUpDomId(vertex.id),
|
||||
haveCallback: vertex.haveCallback,
|
||||
width: vertex.type === 'group' ? 500 : undefined,
|
||||
dir: vertex.dir,
|
||||
type: vertex.type,
|
||||
padding: getConfig().flowchart.padding
|
||||
});
|
||||
@@ -163,6 +164,7 @@ export const addVertices = function(vert, g, svgId) {
|
||||
domId: flowDb.lookUpDomId(vertex.id),
|
||||
width: vertex.type === 'group' ? 500 : undefined,
|
||||
type: vertex.type,
|
||||
dir: vertex.dir,
|
||||
padding: getConfig().flowchart.padding
|
||||
});
|
||||
});
|
||||
@@ -385,7 +387,7 @@ export const draw = function(text, id) {
|
||||
for (let i = subGraphs.length - 1; i >= 0; i--) {
|
||||
subG = subGraphs[i];
|
||||
log.info('Subgraph - ', subG);
|
||||
flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes);
|
||||
flowDb.addVertex(subG.id, subG.title, 'group', undefined, subG.classes, subG.dir);
|
||||
}
|
||||
|
||||
// Fetch the verices/nodes and edges/links from the parsed graph definition
|
||||
|
Reference in New Issue
Block a user