labels: tabs instead of white spaces

This commit is contained in:
Michael Sokol 2012-03-23 20:37:29 +01:00
parent 1a1a2bad3d
commit a48a74907e

View File

@ -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) {