From b7fc52bcb306f17d477b85dab0f3df24e71908d3 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Sat, 2 Jul 2016 17:14:58 +0100 Subject: [PATCH] Tweak the svg stroke width based on scale. The stroke width is applied before scaling, but we actually want the outline to have the same weight regardless of the scale chosen. --- 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 9a4d556..a1a8909 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -270,7 +270,7 @@ PlaneObject.prototype.updateIcon = function() { var opacity = (this.position_from_mlat ? 0.75 : 1.0); var outline = (this.position_from_mlat ? OutlineMlatColor : OutlineADSBColor); var type = this.getMarkerIconType(); - var weight = this.selected ? 4 : 1; + var weight = ((this.selected ? 2 : 1) / MarkerIcons[type].scale).toFixed(1); var rotation = (this.track === null ? 0 : this.track); var svgKey = col + '!' + outline + '!' + type + '!' + weight;