Font size bug fix

This commit is contained in:
Dennis Hotson 2014-01-11 05:26:23 +11:00
parent e2e24d0601
commit 36a98b03cd

View File

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