Fixed bug that causes inconsistant behavior for highlighting selected nodes.

This commit is contained in:
cp123127 2013-11-06 19:37:18 -08:00 committed by Dennis Hotson
parent bcd9efd220
commit 1b85a2e9b8

View File

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