Allow selecting map markers without triggering expanding card
This commit is contained in:
parent
b991849f5b
commit
e0fda5fd41
@ -57,7 +57,7 @@ var leafletpeoplelayer = L.geoJson(
|
||||
}
|
||||
},
|
||||
pointToLayer: function (feature, latlng) {
|
||||
return L.marker(latlng, {
|
||||
var marker = L.marker(latlng, {
|
||||
icon: L.icon({
|
||||
iconUrl: "img/mapmarker.svg",
|
||||
iconSize: [25, 41],
|
||||
@ -65,6 +65,7 @@ var leafletpeoplelayer = L.geoJson(
|
||||
popupAnchor: [0, -28]
|
||||
})
|
||||
});
|
||||
return marker;
|
||||
}
|
||||
}
|
||||
);
|
||||
@ -82,10 +83,11 @@ function updateMap() {
|
||||
if (data.type == "FeatureCollection") {
|
||||
leafletpeoplelayer.clearLayers();
|
||||
data.features.forEach(function (item) {
|
||||
item.properties.popupContent = "<i class=\"fas fa-user\"></i> " + item.properties.name + "<br><br><a class=\"button button-small button-fill text-color-white\" href=\"/sendmoney/" + item.properties.id + "\">Send Money</a>";
|
||||
item.properties.popupContent = "<i class=\"fas fa-user\"></i> " + item.properties.name + "<br><br><a class=\"button button-small button-fill text-color-white card-prevent-open\" href=\"/sendmoney/" + item.properties.id + "\">Send Money</a>";
|
||||
leafletpeoplelayer.addData(item);
|
||||
});
|
||||
leafletmap.addLayer(leafletpeoplelayer);
|
||||
$(".leaflet-marker-icon").addClass("card-prevent-open");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -120,7 +120,7 @@
|
||||
{{/if}}
|
||||
{{#if giver}}
|
||||
<div class="col-100 tablet-50 desktop-33">
|
||||
<div class="card card-expandable elevation-2" id="map-card" style="margin-top: var(--f7-card-margin-vertical);" onclick="openMapCard()">
|
||||
<div class="card card-expandable elevation-2" id="map-card" style="margin-top: var(--f7-card-margin-vertical);">
|
||||
|
||||
<div class="card-header card-opened-fade-out" style="z-index: 9999999; background-color: rgba(255,255,255,0.5);">
|
||||
<div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user