diff --git a/public_html/markers.js b/public_html/markers.js index 444296d..eb09c23 100755 --- a/public_html/markers.js +++ b/public_html/markers.js @@ -5,68 +5,68 @@ // FA icons var shapes = { 'airliner': { - svg: 'airliner_live', + svg: 'airliner_live', size: [25,26] }, 'balloon': { - svg: 'balloon_live', + svg: 'balloon_live', size: [9,13], noRotate: true }, 'cessna': { - svg: 'cessna_live', + svg: 'cessna_live', size: [17,13] }, 'heavy_2e': { - svg: 'heavy_2e_live', + svg: 'heavy_2e_live', size: [28,29] }, 'heavy_4e': { - svg: 'heavy_4e_live', + svg: 'heavy_4e_live', size: [28,30] }, 'helicopter': { - svg: 'helicopter_live', + svg: 'helicopter_live', size: [16,18] }, 'hi_perf': { - svg: 'hi_perf_live', + svg: 'hi_perf_live', size: [15,21] }, 'jet_nonswept': { - svg: 'jet_nonswept_live', + svg: 'jet_nonswept_live', size: [18,18] }, 'jet_swept': { - svg: 'jet_swept_live', + svg: 'jet_swept_live', size: [18,24] }, 'twin_large': { - svg: 'twin_large_live', + svg: 'twin_large_live', size: [21,20] }, 'twin_small': { - svg: 'twin_small_live', + svg: 'twin_small_live', size: [19,16] }, 'ground_emergency': { - svg: 'emergency_dark', + svg: 'emergency_dark', size: [6, 15] }, 'ground_service': { - svg: 'service_dark', + svg: 'service_dark', size: [6, 15] }, 'ground_unknown': { - svg: 'unknown_dark', + svg: 'unknown_dark', size: [6, 15] }, 'ground_fixed': { - svg: 'fixed_dark', + svg: 'fixed_dark', size: [12, 12] }, 'unknown': { - svg: 'unknown_live', + svg: 'unknown_live', size: [17,17] } } @@ -286,12 +286,12 @@ function getBaseMarker(category, typeDesignator, typeDescription, wtc) { return shapes['unknown']; } -function svgPathToSvg(path, stroke, fill) { - path = path.replace('aircraft_color_fill', fill).replace('aircraft_color_stroke', stroke); +function svgPathToSvg(path, stroke, fill, selected_stroke) { + path = path.replace('aircraft_color_fill', fill).replace('aircraft_color_stroke', stroke).replace('add_stroke_selected', selected_stroke); return path; } -function svgPathToURI(path, stroke, fill) { - return "data:image/svg+xml;base64," + btoa(svgPathToSvg(path, stroke, fill)); +function svgPathToURI(path, stroke, fill, selected_stroke) { + return "data:image/svg+xml;base64," + btoa(svgPathToSvg(path, stroke, fill, selected_stroke)); } diff --git a/public_html/planeObject.js b/public_html/planeObject.js index c117408..e53b9af 100644 --- a/public_html/planeObject.js +++ b/public_html/planeObject.js @@ -352,11 +352,12 @@ PlaneObject.prototype.updateIcon = function() { var col = this.getMarkerColor(); var opacity = 1.0; var outline = (this.position_from_mlat ? OutlineMlatColor : OutlineADSBColor); + var add_stroke = (this.selected) ? ' 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 transparentBorderWidth = (32 / baseMarker.scale / scaleFactor).toFixed(1); - var svgKey = col + '!' + outline + '!' + baseMarker.svg + '!' + "!" + scaleFactor; + var svgKey = col + '!' + outline + '!' + baseMarker.svg + '!' + add_stroke + "!" + scaleFactor; var styleKey = opacity + '!' + rotation; if (this.markerStyle === null || this.markerIcon === null || this.markerSvgKey != svgKey) { @@ -368,7 +369,7 @@ PlaneObject.prototype.updateIcon = function() { anchorYUnits: 'fraction', scale: 1.2 * scaleFactor, imgSize: baseMarker.size, - src: svgPathToURI(baseMarker.svg, outline, col), + src: svgPathToURI(baseMarker.svg, outline, col, add_stroke), rotation: (baseMarker.noRotate ? 0 : rotation * Math.PI / 180.0), opacity: opacity, rotateWithView: (baseMarker.noRotate ? false : true)