From 345d4606435cc4ba74193b054a75841f9f45e240 Mon Sep 17 00:00:00 2001 From: Bernard Vander Beken Date: Wed, 4 Jan 2017 11:19:14 +0100 Subject: [PATCH 1/2] Fix spelling --- docs/content/flowchart.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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#. From a124be71b1094e3ea13ccb5ecfd3e187089ae4e1 Mon Sep 17 00:00:00 2001 From: Rebecca Dreezer Date: Thu, 5 Jan 2017 22:02:38 -0500 Subject: [PATCH 2/2] Allow .node>circle to receive css styles --- src/utils.js | 2 +- src/utils.spec.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/utils.js b/src/utils.js index 9fbdf28ab..3024b6f84 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 c63ae9682..58cf0455f 100644 --- a/src/utils.spec.js +++ b/src/utils.spec.js @@ -196,9 +196,8 @@ 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; }' ]); }); }); -