diff --git a/html/planeObject.js b/html/planeObject.js index b4790b4..fe1ac4a 100644 --- a/html/planeObject.js +++ b/html/planeObject.js @@ -1149,11 +1149,12 @@ PlaneObject.prototype.processTrace = function() { }; PlaneObject.prototype.updatePositionData = function(now, last, data, init) { - let newPos = this.updateTrack(now, last); + if (!globeIndex || this.selected || SelectedAllPlanes) { + let newPos = this.updateTrack(now, last); + this.drawLine |= newPos; + } - this.drawLine |= newPos; - - if (globeIndex && newPos) { + if (globeIndex) { this.trace.push({ now: this.position_time, position: this.position, @@ -1163,7 +1164,7 @@ PlaneObject.prototype.updatePositionData = function(now, last, data, init) { track: this.track, rotation: this.rotation, }); - if (this.trace.length > 20) { + if (this.trace.length > 100) { this.trace.slice(-15); } } diff --git a/html/script.js b/html/script.js index 01814b5..fa436e1 100644 --- a/html/script.js +++ b/html/script.js @@ -3475,6 +3475,13 @@ function selectAllPlanes() { toggleIsolation(false, "off"); SelectedAllPlanes = true; + + if (globeIndex) { + for (let i in PlanesOrdered) { + let plane = PlanesOrdered[i]; + plane.processTrace(); + } + } refreshFeatures(); jQuery('#selectall_checkbox').addClass('settingsCheckboxChecked');