From 1b85a2e9b81242a2cd002850822d21f71d07dde1 Mon Sep 17 00:00:00 2001 From: cp123127 Date: Wed, 6 Nov 2013 19:37:18 -0800 Subject: [PATCH] Fixed bug that causes inconsistant behavior for highlighting selected nodes. --- springyui.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/springyui.js b/springyui.js index 6252eb9..5fd2460 100755 --- a/springyui.js +++ b/springyui.js @@ -252,7 +252,7 @@ jQuery.fn.springy = function(params) { ctx.clearRect(s.x - boxWidth/2, s.y - 10, boxWidth, 20); // fill background - if (selected !== null && nearest.node !== null && selected.node.id === node.id) { + if (selected !== null && selected.node !== null && selected.node.id === node.id) { ctx.fillStyle = "#FFFFE0"; } else if (nearest !== null && nearest.node !== null && nearest.node.id === node.id) { ctx.fillStyle = "#EEEEEE";