From 4eb8e3d96a214678e40b70206b3c159bf5a31ff6 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Fri, 16 Sep 2016 11:04:33 +0100 Subject: [PATCH] Set visible=false if we don't display a marker due to stale position; this avoids markers briefly blinking back in on zoom. --- public_html/planeObject.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 99af19f..ee76dd2 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -445,8 +445,8 @@ PlaneObject.prototype.updateTick = function(receiver_timestamp, last_timestamp) selectPlaneByHex(null,false); } } else { - this.visible = true; if (this.position !== null && (this.selected || this.seen_pos < 60)) { + this.visible = true; if (this.updateTrack(receiver_timestamp - last_timestamp + (this.position_from_mlat ? 30 : 5))) { this.updateLines(); this.updateMarker(true); @@ -455,6 +455,7 @@ PlaneObject.prototype.updateTick = function(receiver_timestamp, last_timestamp) } } else { this.clearMarker(); + this.visible = false; } } };