temporary trails via config option

This commit is contained in:
Matthias Wirth
2019-11-28 17:15:59 +01:00
parent 17a4c3222b
commit cb3289bfb2
4 changed files with 42 additions and 5 deletions

View File

@@ -736,7 +736,6 @@ function parse_history() {
for (var i in PlanesOrdered)
setupPlane(PlanesOrdered[i].icao,PlanesOrdered[i]);
}
try {
PositionHistoryBuffer = null;
console.timeEnd("Loaded aircraft tracks from History");
@@ -749,6 +748,10 @@ function parse_history() {
// Setup our timer to poll from the server.
window.setInterval(reaper, 60000);
if (tempTrails) {
window.setInterval(trailReaper, 10000);
trailReaper(now);
}
if (enable_pf_data) {
window.setInterval(fetchPfData, RefreshInterval*10.314);
}
@@ -766,9 +769,6 @@ function parse_history() {
if (localStorage['sidebar_visible'] == "false")
toggleSidebarVisibility();
} catch (error) {
alert(error.message);
}
}
// Make a LineString with 'points'-number points
@@ -2821,3 +2821,9 @@ function findPlanes(query, byIcao, byCallsign, byReg) {
console.log("No match found for query: " + query);
}
}
function trailReaper() {
for (var i in PlanesOrdered) {
PlanesOrdered[i].reapTrail();
}
}