mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-10-08 16:49:38 +02:00
Merge pull request #1695 from mermaid-js/1694_style_flowchart
#1694 Applying styles from the graph definition for flowcharts
This commit is contained in:
@@ -261,6 +261,7 @@ const rect = (parent, node) => {
|
||||
|
||||
rect
|
||||
.attr('class', 'basic label-container')
|
||||
.attr('style', node.style)
|
||||
.attr('rx', node.rx)
|
||||
.attr('ry', node.ry)
|
||||
.attr('x', -bbox.width / 2 - halfPadding)
|
||||
|
@@ -15,7 +15,10 @@ export const labelHelper = (parent, node, _classes, isNode) => {
|
||||
.attr('id', node.domId || node.id);
|
||||
|
||||
// Create the label and insert it after the rect
|
||||
const label = shapeSvg.insert('g').attr('class', 'label');
|
||||
const label = shapeSvg
|
||||
.insert('g')
|
||||
.attr('class', 'label')
|
||||
.attr('style', node.labelStyle);
|
||||
|
||||
const text = label
|
||||
.node()
|
||||
|
Reference in New Issue
Block a user