From f1cb09d0e3e6ed1f907279e52a59b58db7c0a2e8 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Tue, 30 Jul 2019 13:30:03 +0200 Subject: [PATCH] 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. --- public_html/planeObject.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 6e81ffd..39e3c4d 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -337,7 +337,7 @@ PlaneObject.prototype.getAltitudeColor = function(altitude) { h = ColorByAlt.unknown.h; s = ColorByAlt.unknown.s; l = ColorByAlt.unknown.l; - } else if (this.altitude === "ground") { + } else if (altitude === "ground") { h = ColorByAlt.ground.h; s = ColorByAlt.ground.s; l = ColorByAlt.ground.l;