From f04a71640a0a8bbc5648e5e6bacb2d1e1d068894 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Mon, 4 Mar 2019 15:13:38 +0000 Subject: [PATCH] Skyview: try true_heading / mag_heading for icon rotation if track is missing --- public_html/planeObject.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/public_html/planeObject.js b/public_html/planeObject.js index 437fc0c..a670f30 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -384,7 +384,16 @@ PlaneObject.prototype.updateIcon = function() { var outline = (this.position_from_mlat ? OutlineMlatColor : OutlineADSBColor); var add_stroke = (this.selected && !SelectedAllPlanes) ? ' stroke="black" stroke-width="1px"' : ''; var baseMarker = getBaseMarker(this.category, this.icaotype, this.typeDescription, this.wtc); - var rotation = (this.track === null ? 0 : this.track); + var rotation = this.track; + if (rotation === null) { + rotation = this.true_heading; + } + if (rotation === null) { + rotation = this.mag_heading; + } + if (rotation === null) { + rotation = 0; + } //var transparentBorderWidth = (32 / baseMarker.scale / scaleFactor).toFixed(1); var svgKey = col + '!' + outline + '!' + baseMarker.svg + '!' + add_stroke + "!" + scaleFactor;