Fix map icons staying "alerted" after marking delivered

Skylar Ittner 4 years ago
parent 3962a56db8
commit b21140de11

@ -85,8 +85,9 @@ function leafletMap() {
if (map.openedPanelIconID != null && map.openedPanelIconID == datai.id) {
classes += " selected";
}
// Show different color highlight when nearby
if (packages[i].distance * 1 < getStorage("alertradius") * 1) {
// Show different color highlight when nearby and undelivered
if (packages[i].distance * 1 < getStorage("alertradius") * 1
&& getUndeliveredCount(packages[i]) > 0) {
classes += " alerted";
}
var icon = L.icon({

@ -110,8 +110,9 @@ function mapboxMap() {
if (map.openedPanelIconID != null && map.openedPanelIconID == datai.id) {
el.className += " selected";
}
// Show different color highlight when nearby
if (packages[i].distance * 1 < getStorage("alertradius") * 1) {
// Show different color highlight when nearby and undelivered
if (packages[i].distance * 1 < getStorage("alertradius") * 1
&& getUndeliveredCount(packages[i]) > 0) {
el.className += " alerted";
}

Loading…
Cancel
Save