Merge pull request #267 from Anoia/master

gh-50 Allow styling of edge labels in css
This commit is contained in:
Knut Sveidqvist 2015-12-08 22:45:45 +01:00
commit ab38e17936
5 changed files with 15 additions and 3 deletions

View File

@ -192,7 +192,7 @@ exports.addEdges = function (edges, g) {
var edgeText = edge.text.replace(/<br>/g, '\n');
if(typeof edge.style === 'undefined'){
if (conf.htmlLabels){
g.setEdge(edge.start, edge.end,{labelType: 'html',style: style, labelpos:'c', label: '<span style="background:#e8e8e8">'+edge.text+'</span>', arrowheadStyle: 'fill: #333', arrowhead: aHead},cnt);
g.setEdge(edge.start, edge.end,{labelType: 'html',style: style, labelpos:'c', label: '<span class="edgeLabel">'+edge.text+'</span>', arrowheadStyle: 'fill: #333', arrowhead: aHead},cnt);
}else{
g.setEdge(edge.start, edge.end,{labelType: 'text', style: 'stroke: #333; stroke-width: 1.5px;fill:none', labelpos:'c', label: edgeText, arrowheadStyle: 'fill: #333', arrowhead: aHead},cnt);
}

View File

@ -11,8 +11,12 @@
.edgePath .path {
stroke: @lineColor;
}
.edgeLabel {
background-color: @edgeLabelBackground;
}
.cluster rect{
fill: @secondBkg !important;
rx:4 !important;

View File

@ -15,6 +15,8 @@
@titleColor: #333;
@edgeLabelBackground: #e8e8e8;
/* Sequence Diagram variables */
@actorBorder: @border1;
@actorBkg: @mainBkg;

View File

@ -15,8 +15,12 @@ color:#333
.edgePath .path {
stroke: @lineColor;
stroke-width: 1.5px;
}
.edgeLabel {
background-color: @edgeLabelBackground;
}
.cluster rect{
fill: @secondBkg !important;
rx:4 !important;

View File

@ -16,6 +16,8 @@
@titleColor: #333;
@edgeLabelBackground: #e8e8e8;
/* Sequence Diagram variables */
@actorBorder: @border1;
@actorBkg: @mainBkg;