diff --git a/docs/content/flowchart.md b/docs/content/flowchart.md index de8578e29..008d6608b 100644 --- a/docs/content/flowchart.md +++ b/docs/content/flowchart.md @@ -345,6 +345,7 @@ should have a different look. a class definition looks like the example below: + ``` classDef className fill:#f9f,stroke:#333,stroke-width:4px; ``` @@ -396,7 +397,7 @@ If a class is named default it will be assigned to all classes without specific ## Basic support for fontawesome -It is possible to add icons from fontawesome. In order to do so, you need to add the fontwesome as described in the instructions at +It is possible to add icons from fontawesome. In order to do so, you need to add the fontawesome as described in the instructions at [the fontawesome web site](https://fortawesome.github.io/Font-Awesome/). The icons are acessed via the syntax fa:#icon class name#. diff --git a/src/utils.js b/src/utils.js index 09b33080d..fe30a67e6 100644 --- a/src/utils.js +++ b/src/utils.js @@ -112,7 +112,7 @@ var cloneCssStyles = function(svg, classes){ } } else { if (classes[className].styles instanceof Array) { - embeddedStyles += '#' + svg.id.trim() + ' .' + className + '>rect, .' + className + '>polygon, .' + className + '>ellipse { ' + classes[className].styles.join('; ') + '; }\n'; + embeddedStyles += '#' + svg.id.trim() + ' .' + className + '>rect, .' + className + '>polygon, .' + className + '>circle, .' + className + '>ellipse { ' + classes[className].styles.join('; ') + '; }\n'; } } } diff --git a/src/utils.spec.js b/src/utils.spec.js index a1c67efb3..ea7782dde 100644 --- a/src/utils.spec.js +++ b/src/utils.spec.js @@ -196,11 +196,10 @@ describe('when cloning CSS ', function () { expect(stylesToArray(svg)).toEqual(['#mermaid-01 .node>rect { stroke:#ffffff; stroke-width:1.5px; }', '.node { stroke: #eeeeee;}', '.node-square { stroke: #bbbbbb;}', - '#mermaid-01 .node-square>rect, .node-square>polygon, .node-square>ellipse { fill:#eeeeee; stroke:#aaaaaa; }', - '#mermaid-01 .node-circle>rect, .node-circle>polygon, .node-circle>ellipse { fill:#444444; stroke:#111111; }' + '#mermaid-01 .node-square>rect, .node-square>polygon, .node-square>circle, .node-square>ellipse { fill:#eeeeee; stroke:#aaaaaa; }', + '#mermaid-01 .node-circle>rect, .node-circle>polygon, .node-circle>circle, .node-circle>ellipse { fill:#444444; stroke:#111111; }' ]); }); -}); describe('when finding substring in array ', function () { it('should return the array index that contains the substring', function () {