From a124be71b1094e3ea13ccb5ecfd3e187089ae4e1 Mon Sep 17 00:00:00 2001 From: Rebecca Dreezer Date: Thu, 5 Jan 2017 22:02:38 -0500 Subject: [PATCH] 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 9fbdf28ab5..3024b6f846 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 c63ae9682f..58cf0455f4 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; }' ]); }); }); -