Replace query marker fade animation with css
This commit is contained in:
parent
e15a92a302
commit
771b75ed71
2 changed files with 12 additions and 12 deletions
|
@ -289,18 +289,10 @@ OSM.Query = function (map) {
|
||||||
.hide();
|
.hide();
|
||||||
|
|
||||||
if (marker) map.removeLayer(marker);
|
if (marker) map.removeLayer(marker);
|
||||||
marker = L.circle(latlng, radius, featureStyle).addTo(map);
|
marker = L.circle(latlng, Object.assign({
|
||||||
|
radius: radius,
|
||||||
$(document).everyTime(75, "fadeQueryMarker", function (i) {
|
className: "query-marker"
|
||||||
if (i === 10) {
|
}, featureStyle)).addTo(map);
|
||||||
map.removeLayer(marker);
|
|
||||||
} else {
|
|
||||||
marker.setStyle({
|
|
||||||
opacity: 1 - (i * 0.1),
|
|
||||||
fillOpacity: 0.5 - (i * 0.05)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}, 10);
|
|
||||||
|
|
||||||
runQuery(latlng, radius, nearby, $("#query-nearby"), false);
|
runQuery(latlng, radius, nearby, $("#query-nearby"), false);
|
||||||
runQuery(latlng, radius, isin, $("#query-isin"), true, compareSize);
|
runQuery(latlng, radius, isin, $("#query-isin"), true, compareSize);
|
||||||
|
|
|
@ -368,6 +368,14 @@ body.small-nav {
|
||||||
.leaflet-marker-draggable {
|
.leaflet-marker-draggable {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.query-marker {
|
||||||
|
animation: 1500ms forwards query-marker-fade;
|
||||||
|
|
||||||
|
@keyframes query-marker-fade {
|
||||||
|
to { opacity: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#map-ui {
|
#map-ui {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue