From: Tom Hughes Date: Fri, 8 Nov 2024 08:03:41 +0000 (+0000) Subject: Merge remote-tracking branch 'upstream/pull/5307' X-Git-Tag: live~49 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/3a1b4cbe3396092efa2ea2c60cdbfb2a6ed6de0d?hp=708603801a1c93cc1afb55c632a4efeba2419b79 Merge remote-tracking branch 'upstream/pull/5307' --- diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 7d63280ee..09e4de31e 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -289,18 +289,10 @@ OSM.Query = function (map) { .hide(); if (marker) map.removeLayer(marker); - marker = L.circle(latlng, radius, featureStyle).addTo(map); - - $(document).everyTime(75, "fadeQueryMarker", function (i) { - if (i === 10) { - map.removeLayer(marker); - } else { - marker.setStyle({ - opacity: 1 - (i * 0.1), - fillOpacity: 0.5 - (i * 0.05) - }); - } - }, 10); + marker = L.circle(latlng, Object.assign({ + radius: radius, + className: "query-marker" + }, featureStyle)).addTo(map); runQuery(latlng, radius, nearby, $("#query-nearby"), false); runQuery(latlng, radius, isin, $("#query-isin"), true, compareSize); diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index d551462b2..8dba773d8 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -368,6 +368,14 @@ body.small-nav { .leaflet-marker-draggable { cursor: move; } + + .query-marker { + animation: 1500ms forwards query-marker-fade; + + @keyframes query-marker-fade { + to { opacity: 0 } + } + } } #map-ui {