Merge pull request #1781 from mermaid-js/bug/1751_flowchart_subgraph_styles

Apply style settings to subgraphs in "flowchart" diagrams
This commit is contained in:
GDFaber
2020-11-18 00:42:30 +01:00
committed by GitHub
5 changed files with 42 additions and 9 deletions

View File

@@ -40,6 +40,7 @@ const rect = (parent, node) => {
log.trace('Data ', node, JSON.stringify(node));
// center the rect around its coordinate
rect
.attr('style', node.style)
.attr('rx', node.rx)
.attr('ry', node.ry)
.attr('x', node.x - node.width / 2 - halfPadding)
@@ -53,7 +54,7 @@ const rect = (parent, node) => {
'translate(' +
(node.x - bbox.width / 2) +
', ' +
(node.y - node.height / 2 - node.padding / 3 + 3) +
(node.y - node.height / 2 + node.padding / 3) +
')'
);