From 322a7bae8bc33f5c3f787657df3b9a6d5544fe12 Mon Sep 17 00:00:00 2001 From: "shigeru.nakajima" Date: Fri, 10 Oct 2014 18:48:27 +0900 Subject: [PATCH] Add node color. --- springyui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/springyui.js b/springyui.js index f03b35e..acc35eb 100755 --- a/springyui.js +++ b/springyui.js @@ -324,7 +324,7 @@ jQuery.fn.springy = function(params) { ctx.textAlign = "left"; ctx.textBaseline = "top"; ctx.font = (node.data.font !== undefined) ? node.data.font : nodeFont; - ctx.fillStyle = "#000000"; + ctx.fillStyle = (node.data.color !== undefined) ? node.data.color : "#000000"; var text = (node.data.label !== undefined) ? node.data.label : node.id; ctx.fillText(text, s.x - contentWidth/2, s.y - contentHeight/2); } else {