Skip to content

Commit

Permalink
Fix text label colors for flow charts
Browse files Browse the repository at this point in the history
When htmlLabels is set to `false` and a background fill color is used
for a node, the text label will inherit the fill color, hiding the
actual text. To fix this, explicitly set the fill color to `mermaid-js#333`, the
same value used in `src/themes/flowchart.scss`.

Closes mermaid-js#885
  • Loading branch information
stanhu committed Jul 21, 2019
1 parent 9596715 commit 83b7163
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/diagrams/flowchart/flowRenderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export const addVertices = function (vert, g, svgId) {
tspan.setAttributeNS('http://www.w3.org/XML/1998/namespace', 'xml:space', 'preserve')
tspan.setAttribute('dy', '1em')
tspan.setAttribute('x', '1')
tspan.setAttribute('fill', '#333')
tspan.textContent = rows[j]
svgLabel.appendChild(tspan)
}
Expand Down

0 comments on commit 83b7163

Please sign in to comment.