Handle long refresh rates better, don't draw all tracks as dotted.

This commit is contained in:
Oliver Jowett 2015-02-11 00:15:48 +00:00
parent 2ba56231a6
commit 6fbeae070c
2 changed files with 6 additions and 4 deletions
public_html

View file

@ -245,7 +245,7 @@ PlaneObject.prototype.updateData = function(receiver_timestamp, data) {
this.squawk = data.squawk;
};
PlaneObject.prototype.updateTick = function(receiver_timestamp) {
PlaneObject.prototype.updateTick = function(receiver_timestamp, last_timestamp) {
// recompute seen and seen_pos
this.seen = receiver_timestamp - this.last_message_time;
this.seen_pos = (this.last_position_time === null ? null : receiver_timestamp - this.last_position_time);
@ -262,7 +262,7 @@ PlaneObject.prototype.updateTick = function(receiver_timestamp) {
} else {
this.visible = true;
if (this.position !== null) {
if (this.updateTrack(5)) {
if (this.updateTrack(receiver_timestamp - last_timestamp + 5)) {
this.updateLines();
this.updateMarker(true);
} else {