mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-01-14 06:43:25 +08:00
Background on labels and centering of labels
This commit is contained in:
parent
d6c26ab2cd
commit
8e591c0494
4
dist/mermaid.full.js
vendored
4
dist/mermaid.full.js
vendored
@ -776,11 +776,11 @@ var addEdges = function (edges, g) {
|
||||
else {
|
||||
|
||||
if(typeof edge.style === 'undefined'){
|
||||
g.setEdge(edge.start, edge.end,{style: "stroke: #333; stroke-width: 1.5px;fill:none", label: edge.text, arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
|
||||
g.setEdge(edge.start, edge.end,{labelType: "html",style: "stroke: #333; stroke-width: 1.5px;fill:none", labelpos:'c', label: '<span style="background:#e8e8e8">'+edge.text+'</span>', arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
|
||||
}else{
|
||||
|
||||
g.setEdge(edge.start, edge.end, {
|
||||
style: edge.style, arrowheadStyle: "fill: #333", label: edge.text, arrowhead: aHead
|
||||
labelType: "html",style: edge.style, arrowheadStyle: "fill: #333", label: edge.text, arrowhead: aHead
|
||||
},cnt);
|
||||
}
|
||||
}
|
||||
|
4
dist/mermaid.full.min.js
vendored
4
dist/mermaid.full.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/mermaid.slim.js
vendored
4
dist/mermaid.slim.js
vendored
@ -744,11 +744,11 @@ var addEdges = function (edges, g) {
|
||||
else {
|
||||
|
||||
if(typeof edge.style === 'undefined'){
|
||||
g.setEdge(edge.start, edge.end,{style: "stroke: #333; stroke-width: 1.5px;fill:none", label: edge.text, arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
|
||||
g.setEdge(edge.start, edge.end,{labelType: "html",style: "stroke: #333; stroke-width: 1.5px;fill:none", labelpos:'c', label: '<span style="background:#e8e8e8">'+edge.text+'</span>', arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
|
||||
}else{
|
||||
|
||||
g.setEdge(edge.start, edge.end, {
|
||||
style: edge.style, arrowheadStyle: "fill: #333", label: edge.text, arrowhead: aHead
|
||||
labelType: "html",style: edge.style, arrowheadStyle: "fill: #333", label: edge.text, arrowhead: aHead
|
||||
},cnt);
|
||||
}
|
||||
}
|
||||
|
4
dist/mermaid.slim.min.js
vendored
4
dist/mermaid.slim.min.js
vendored
File diff suppressed because one or more lines are too long
@ -114,11 +114,11 @@ var addEdges = function (edges, g) {
|
||||
else {
|
||||
|
||||
if(typeof edge.style === 'undefined'){
|
||||
g.setEdge(edge.start, edge.end,{style: "stroke: #333; stroke-width: 1.5px;fill:none", label: edge.text, arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
|
||||
g.setEdge(edge.start, edge.end,{labelType: "html",style: "stroke: #333; stroke-width: 1.5px;fill:none", labelpos:'c', label: '<span style="background:#e8e8e8">'+edge.text+'</span>', arrowheadStyle: "fill: #333", arrowhead: aHead},cnt);
|
||||
}else{
|
||||
|
||||
g.setEdge(edge.start, edge.end, {
|
||||
style: edge.style, arrowheadStyle: "fill: #333", label: edge.text, arrowhead: aHead
|
||||
labelType: "html",style: edge.style, arrowheadStyle: "fill: #333", label: edge.text, arrowhead: aHead
|
||||
},cnt);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user