Fix map icons staying "alerted" after marking delivered
This commit is contained in:
parent
3962a56db8
commit
b21140de11
@ -80,13 +80,14 @@ function leafletMap() {
|
|||||||
//console.log(iconName);
|
//console.log(iconName);
|
||||||
|
|
||||||
var classes = "package-marker package-marker-leaflet";
|
var classes = "package-marker package-marker-leaflet";
|
||||||
|
|
||||||
// Prevent selection highlight from going away after map refresh
|
// Prevent selection highlight from going away after map refresh
|
||||||
if (map.openedPanelIconID != null && map.openedPanelIconID == datai.id) {
|
if (map.openedPanelIconID != null && map.openedPanelIconID == datai.id) {
|
||||||
classes += " selected";
|
classes += " selected";
|
||||||
}
|
}
|
||||||
// Show different color highlight when nearby
|
// Show different color highlight when nearby and undelivered
|
||||||
if (packages[i].distance * 1 < getStorage("alertradius") * 1) {
|
if (packages[i].distance * 1 < getStorage("alertradius") * 1
|
||||||
|
&& getUndeliveredCount(packages[i]) > 0) {
|
||||||
classes += " alerted";
|
classes += " alerted";
|
||||||
}
|
}
|
||||||
var icon = L.icon({
|
var icon = L.icon({
|
||||||
|
@ -110,8 +110,9 @@ function mapboxMap() {
|
|||||||
if (map.openedPanelIconID != null && map.openedPanelIconID == datai.id) {
|
if (map.openedPanelIconID != null && map.openedPanelIconID == datai.id) {
|
||||||
el.className += " selected";
|
el.className += " selected";
|
||||||
}
|
}
|
||||||
// Show different color highlight when nearby
|
// Show different color highlight when nearby and undelivered
|
||||||
if (packages[i].distance * 1 < getStorage("alertradius") * 1) {
|
if (packages[i].distance * 1 < getStorage("alertradius") * 1
|
||||||
|
&& getUndeliveredCount(packages[i]) > 0) {
|
||||||
el.className += " alerted";
|
el.className += " alerted";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -719,7 +719,7 @@ function addPackageByBarcode(barcode, type, callback) {
|
|||||||
ajaxlookup();
|
ajaxlookup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
prelookup();
|
prelookup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user