labels: tabs instead of white spaces
This commit is contained in:
parent
1a1a2bad3d
commit
a48a74907e
22
springyui.js
22
springyui.js
|
@ -219,18 +219,18 @@ jQuery.fn.springy = function(params) {
|
|||
ctx.restore();
|
||||
}
|
||||
|
||||
// label
|
||||
// label
|
||||
|
||||
if (typeof(edge.data.label) !== 'undefined') {
|
||||
text = edge.data.label
|
||||
ctx.save();
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "top";
|
||||
ctx.font = "10px Helvetica, sans-serif";
|
||||
ctx.fillStyle = "#5BA6EC";
|
||||
ctx.fillText(text, (x1+x2)/2, (y1+y2)/2);
|
||||
ctx.restore();
|
||||
}
|
||||
if (typeof(edge.data.label) !== 'undefined') {
|
||||
text = edge.data.label
|
||||
ctx.save();
|
||||
ctx.textAlign = "center";
|
||||
ctx.textBaseline = "top";
|
||||
ctx.font = "10px Helvetica, sans-serif";
|
||||
ctx.fillStyle = "#5BA6EC";
|
||||
ctx.fillText(text, (x1+x2)/2, (y1+y2)/2);
|
||||
ctx.restore();
|
||||
}
|
||||
|
||||
},
|
||||
function drawNode(node, p) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user