Font size bug fix
This commit is contained in:
parent
e2e24d0601
commit
36a98b03cd
|
@ -27,7 +27,7 @@ Copyright (c) 2010 Dennis Hotson
|
||||||
|
|
||||||
jQuery.fn.springy = function(params) {
|
jQuery.fn.springy = function(params) {
|
||||||
var graph = this.graph = params.graph || new Springy.Graph();
|
var graph = this.graph = params.graph || new Springy.Graph();
|
||||||
var nodeFont = "12px Verdana, sans-serif";
|
var nodeFont = "16px Verdana, sans-serif";
|
||||||
var edgeFont = "8px Verdana, sans-serif";
|
var edgeFont = "8px Verdana, sans-serif";
|
||||||
var stiffness = params.stiffness || 400.0;
|
var stiffness = params.stiffness || 400.0;
|
||||||
var repulsion = params.repulsion || 400.0;
|
var repulsion = params.repulsion || 400.0;
|
||||||
|
@ -269,7 +269,6 @@ jQuery.fn.springy = function(params) {
|
||||||
ctx.textBaseline = "top";
|
ctx.textBaseline = "top";
|
||||||
ctx.font = (node.data.font !== undefined) ? node.data.font : nodeFont;
|
ctx.font = (node.data.font !== undefined) ? node.data.font : nodeFont;
|
||||||
ctx.fillStyle = "#000000";
|
ctx.fillStyle = "#000000";
|
||||||
ctx.font = "16px Verdana, sans-serif";
|
|
||||||
var text = (node.data.label !== undefined) ? node.data.label : node.id;
|
var text = (node.data.label !== undefined) ? node.data.label : node.id;
|
||||||
ctx.fillText(text, s.x - boxWidth/2 + 5, s.y - 8);
|
ctx.fillText(text, s.x - boxWidth/2 + 5, s.y - 8);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user