From a04f198ade7a3c704228dece5829cf1727f49e9d Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 16 May 2021 17:30:34 +0200 Subject: [PATCH] inline the google maps pin svg --- htdocs/css/openwebrx.css | 7 +------ htdocs/gfx/svg-defs.svg | 1 + htdocs/lib/MessagePanel.js | 1 + htdocs/lib/MetaPanel.js | 2 +- .../gfx => inkscape files}/google_maps_pin.svg | 17 ++++++++--------- 5 files changed, 12 insertions(+), 16 deletions(-) rename {htdocs/gfx => inkscape files}/google_maps_pin.svg (89%) diff --git a/htdocs/css/openwebrx.css b/htdocs/css/openwebrx.css index 55d3d01..2021331 100644 --- a/htdocs/css/openwebrx.css +++ b/htdocs/css/openwebrx.css @@ -1079,14 +1079,9 @@ img.openwebrx-mirror-img content: "Down: "; } -.openwebrx-maps-pin { - background-image: url("../gfx/google_maps_pin.svg"); - background-position: center; - background-repeat: no-repeat; +.openwebrx-maps-pin svg { width: 15px; height: 15px; - background-size: contain; - display: inline-block; } .openwebrx-message-panel { diff --git a/htdocs/gfx/svg-defs.svg b/htdocs/gfx/svg-defs.svg index 9a6b083..2ed1d29 100644 --- a/htdocs/gfx/svg-defs.svg +++ b/htdocs/gfx/svg-defs.svg @@ -20,5 +20,6 @@ + \ No newline at end of file diff --git a/htdocs/lib/MessagePanel.js b/htdocs/lib/MessagePanel.js index 83ec91d..2c1a868 100644 --- a/htdocs/lib/MessagePanel.js +++ b/htdocs/lib/MessagePanel.js @@ -180,6 +180,7 @@ PacketMessagePanel.prototype.pushMessage = function(msg) { } } else if (msg.lat && msg.lon) { classes.push('openwebrx-maps-pin'); + overlay = ''; } var attrs = [ 'class="' + classes.join(' ') + '"', diff --git a/htdocs/lib/MetaPanel.js b/htdocs/lib/MetaPanel.js index a0a745a..f266fc9 100644 --- a/htdocs/lib/MetaPanel.js +++ b/htdocs/lib/MetaPanel.js @@ -145,7 +145,7 @@ YsfMetaPanel.prototype.setLocation = function(lat, lon, callsign) { this.hasLocation = hasLocation; this.callsign = callsign; var html = ''; if (hasLocation) { - html = ''; + html = ''; } this.el.find('.openwebrx-ysf-source .location').html(html); }; diff --git a/htdocs/gfx/google_maps_pin.svg b/inkscape files/google_maps_pin.svg similarity index 89% rename from htdocs/gfx/google_maps_pin.svg rename to inkscape files/google_maps_pin.svg index 2c54fe1..1dd4961 100644 --- a/htdocs/gfx/google_maps_pin.svg +++ b/inkscape files/google_maps_pin.svg @@ -1,6 +1,4 @@ - - + inkscape:version="1.0.2 (e86c870879, 2021-01-15, custom)" + sodipodi:docname="google_maps_pin.svg"> + fit-margin-bottom="0" + inkscape:document-rotation="0" />