Skip to content

Commit

Permalink
Fix for issue #262
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv authored and knsv committed Dec 27, 2015
1 parent cc8c5ae commit d56af02
Show file tree
Hide file tree
Showing 6 changed files with 64 additions and 4 deletions.
5 changes: 4 additions & 1 deletion dist/mermaid.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
.edgePath .path {
stroke: #333333;
}
.edgeLabel {
background-color: #e8e8e8;
}
.cluster rect {
fill: #ffffde !important;
rx: 4 !important;
Expand Down Expand Up @@ -251,7 +254,7 @@ text.actor {
*/
text {
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
Expand Down
5 changes: 4 additions & 1 deletion dist/mermaid.forest.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
stroke: green;
stroke-width: 1.5px;
}
.edgeLabel {
background-color: #e8e8e8;
}
.cluster rect {
fill: #cdffb2 !important;
rx: 4 !important;
Expand Down Expand Up @@ -331,7 +334,7 @@ svg .classLabel .label {
stroke: #13540c;
stroke-width: 1;
}
text {
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size: 14px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/less/default/mermaid.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@import "gantt";
@import "variables";

text {
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size:14px;
}
Expand Down
2 changes: 1 addition & 1 deletion src/less/forest/mermaid.less
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@import "gantt";
@import "classDiagram";

text {
.node text {
font-family: 'trebuchet ms', verdana, arial;
font-size:14px;
}
Expand Down
23 changes: 23 additions & 0 deletions test/examples/htmlLabelsFalse.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="https://rawgit.com/knsv/mermaid/master/dist/mermaid.css">
<base href="XXX"/>
<script src="../../dist/mermaid.js"></script>
</head><body>
<script>
mermaid.initialize({
flowchart:{
htmlLabels:false
}
});
</script>
<h1>The nodes should not be false</h1>
<div class="mermaid">
graph LR;
A[Node A]-->B[Node B];
B-->C[Node C];
</div>
</body></html>
31 changes: 31 additions & 0 deletions test/examples/labelOutOfNode.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" type="text/css" href="dist/mermaid.css">
<style>
.node text {
font-size: 14px;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serf;
}

</style>
<script src="../../dist/mermaid.js"></script>
</head><body>
<script>
mermaid.initialize({
flowchart:{
useMaxWidth:true,
htmlLabels:false
},
startOnLoad:true
});
</script>
<h1>The text should be inside the boxes</h1>
<div class="mermaid" id="i211">
graph TD;
A[TESTTESTTESTTESTTESTTESTTEST];
A --> B[testtesttesttesttesttesttesttesttesttesttest];
</div>
</body></html>

0 comments on commit d56af02

Please sign in to comment.