Fixed bug that causes inconsistant behavior for highlighting selected nodes.
This commit is contained in:
parent
bcd9efd220
commit
1b85a2e9b8
|
@ -252,7 +252,7 @@ jQuery.fn.springy = function(params) {
|
||||||
ctx.clearRect(s.x - boxWidth/2, s.y - 10, boxWidth, 20);
|
ctx.clearRect(s.x - boxWidth/2, s.y - 10, boxWidth, 20);
|
||||||
|
|
||||||
// fill background
|
// 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";
|
ctx.fillStyle = "#FFFFE0";
|
||||||
} else if (nearest !== null && nearest.node !== null && nearest.node.id === node.id) {
|
} else if (nearest !== null && nearest.node !== null && nearest.node.id === node.id) {
|
||||||
ctx.fillStyle = "#EEEEEE";
|
ctx.fillStyle = "#EEEEEE";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user