Only reset marker title if it changes.
This commit is contained in:
parent
0f1c0778f2
commit
25ff88c252
|
@ -303,11 +303,9 @@ PlaneObject.prototype.updateMarker = function(moved) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setting the marker title
|
// Setting the marker title
|
||||||
if (this.flight === null || this.flight.length == 0) {
|
var title = (this.flight === null || this.flight.length == 0) ? this.icao : (this.flight+' ('+this.icao+')');
|
||||||
this.marker.setTitle(this.hex);
|
if (title !== this.marker.title)
|
||||||
} else {
|
this.marker.setTitle(title);
|
||||||
this.marker.setTitle(this.flight+' ('+this.icao+')');
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Update our planes tail line,
|
// Update our planes tail line,
|
||||||
|
|
Loading…
Reference in a new issue