Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/pull/5307'
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Nov 8, 2024
2 parents 7086038 + 771b75e commit 3a1b4cb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 4 additions & 12 deletions app/assets/javascripts/index/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions app/assets/stylesheets/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3a1b4cb

Please sign in to comment.