Always show correct source on data popup

This commit is contained in:
James Wilson 2017-05-09 12:23:03 -05:00
parent d225b9bc3f
commit 80eca0ff9a

View file

@ -910,7 +910,7 @@ function refreshSelected() {
} else {
$('#selected_position').text(format_latlng(selected.position));
}
$('#selected_source').text( (selected.position_from_mlat ? "MLAT" : "ADS-B"));
$('#selected_follow').removeClass('hidden');
if (FollowSelected) {
$('#selected_follow').css('font-weight', 'bold');
@ -919,7 +919,15 @@ function refreshSelected() {
$('#selected_follow').css('font-weight', 'normal');
}
}
if (selected.getDataSource() === "adsb_icao") {
$('#selected_source').text("ADS-B");
} else if (selected.getDataSource() === "tisb_trackfile" || selected.getDataSource() === "tisb_icao" || selected.getDataSource() === "tisb_other") {
$('#selected_source').text("TIS-B");
} else if (selected.getDataSource() === "mlat") {
$('#selected_source').text("MLAT");
} else {
$('#selected_source').text("Other");
}
$('#selected_sitedist').text(format_distance_long(selected.sitedist, DisplayUnits));
$('#selected_rssi').text(selected.rssi.toFixed(1) + ' dBFS');
$('#selected_message_count').text(selected.messages);