SkyView: Fix trail color for planes that are now on ground

When determining the color for a given altitude, don't check the current
altitude if it's ground but the altitude passed as an argument to the
function.
Without this fix, when clicking an aircraft on ground, its entire trail
is drawn in the color for ground.
This commit is contained in:
Matthias Wirth 2019-07-30 13:30:03 +02:00
parent 76ab0a7ebe
commit f1cb09d0e3

View file

@ -337,7 +337,7 @@ PlaneObject.prototype.getAltitudeColor = function(altitude) {
h = ColorByAlt.unknown.h; h = ColorByAlt.unknown.h;
s = ColorByAlt.unknown.s; s = ColorByAlt.unknown.s;
l = ColorByAlt.unknown.l; l = ColorByAlt.unknown.l;
} else if (this.altitude === "ground") { } else if (altitude === "ground") {
h = ColorByAlt.ground.h; h = ColorByAlt.ground.h;
s = ColorByAlt.ground.s; s = ColorByAlt.ground.s;
l = ColorByAlt.ground.l; l = ColorByAlt.ground.l;