diff --git a/src/mermaid.html b/src/mermaid.html index ce49aa125..0bfd5b3f3 100644 --- a/src/mermaid.html +++ b/src/mermaid.html @@ -38,8 +38,9 @@
a[Lasa bok]-->b; - b-->c(Vidar)|Klocka; - b{Fundera}-->d(Bjarke)|Lego; + b{Fundera}-->c(Vidar)|Klocka; + b-->d(Bjarke)|Lego; + style a background:#aaa;
\ No newline at end of file diff --git a/src/mermaid.js b/src/mermaid.js index f2cde6ce7..e09bced04 100644 --- a/src/mermaid.js +++ b/src/mermaid.js @@ -21,7 +21,7 @@ define(['parser/graph','parser/mermaid'],function(graph,parser){ g.setNode(vertice.id, { label: verticeText,rx:5,ry:5 }); }else{ if(vertice.type==='diamond'){ - g.setNode(vertice.id, {shape: "house", label: verticeText,rx:0,ry:0 }); + g.setNode(vertice.id, {shape: "house", label: verticeText,rx:0,ry:0,style: "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;" }); }else{ g.setNode(vertice.id, { label: verticeText,rx:0,ry:0 }); } diff --git a/src/parser/graph.js b/src/parser/graph.js index d116e269d..684288d4e 100644 --- a/src/parser/graph.js +++ b/src/parser/graph.js @@ -6,13 +6,14 @@ define('parser/graph',function() { var edges = []; var graph = { addVertex: function (id, text, type, style) { + console.log('Got node ' + id + ' ' + type + ' ' + text + ' styles: ' + JSON.stringify(style)); if(typeof vertices[id] === 'undefined'){ vertices[id]={id:id, styles:[]}; } - if(typeof text !== undefined){ + if(typeof text !== 'undefined'){ vertices[id].text = text; } - if(typeof type !== undefined){ + if(typeof type !== 'undefined'){ vertices[id].type = type; } if(typeof style !== 'undefined'){ @@ -23,7 +24,6 @@ define('parser/graph',function() { }); } } - //console.log('Got node ' + id + ' ' + type + ' ' + text + ' styles: ' + JSON.stringify(style)); }, getVertices:function(){ return vertices;