fix deselecting after selecting all

This commit is contained in:
Matthias Wirth
2020-12-05 15:23:10 +01:00
parent 9ca664d450
commit f2c09f3f9d
2 changed files with 4 additions and 17 deletions

View File

@@ -1432,16 +1432,10 @@ PlaneObject.prototype.updateFeatures = function(now, last, redraw) {
this.seen = Math.max(0, now - this.last_message_time)
this.seen_pos = Math.max(0, now - this.position_time);
if (globeIndex && this.isFiltered())
return;
const lastVisible = this.visible;
this.visible = (!this.isFiltered() && this.checkVisible());
if (this.visible) {
if (SelectedAllPlanes)
this.selected = true;
if (this.drawLine || redraw || lastVisible != this.visible)
this.updateLines();
@@ -1451,7 +1445,6 @@ PlaneObject.prototype.updateFeatures = function(now, last, redraw) {
OLMap.getView().setCenter(ol.proj.fromLonLat(this.position));
}
if (!this.visible && lastVisible) {
//console.log("hiding " + this.icao);
this.clearMarker();
this.clearLines();
this.selected = false;