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";