kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Fixed the NOT bugs as reported by a eslint
rodzic
19d22940db
commit
b43b31e656
|
@ -85,11 +85,10 @@ function makeParkFeature(park, active)
|
||||||
}
|
}
|
||||||
if (parkObj.feature == null)
|
if (parkObj.feature == null)
|
||||||
{
|
{
|
||||||
parkObj.feature = iconFeature(ol.proj.fromLonLat([0,0]), g_gtParkIconActive, 1);
|
parkObj.feature = iconFeature(ol.proj.fromLonLat([0, 0]), g_gtParkIconActive, 1);
|
||||||
}
|
}
|
||||||
feature.key = park;
|
feature.key = park;
|
||||||
feature.size = 1;
|
feature.size = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (e)
|
catch (e)
|
||||||
|
@ -128,7 +127,7 @@ function getPotaParks()
|
||||||
if (g_mapSettings.offlineMode == false && g_potaEnabled == 1)
|
if (g_mapSettings.offlineMode == false && g_potaEnabled == 1)
|
||||||
{
|
{
|
||||||
getBuffer(
|
getBuffer(
|
||||||
"https://storage.googleapis.com/gt_app/pota.json?cb="+Date.now(),
|
"https://storage.googleapis.com/gt_app/pota.json?cb=" + Date.now(),
|
||||||
processPotaParks,
|
processPotaParks,
|
||||||
null,
|
null,
|
||||||
"https",
|
"https",
|
||||||
|
@ -142,9 +141,11 @@ function getPotaParks()
|
||||||
function uniqueArrayFromArray(input)
|
function uniqueArrayFromArray(input)
|
||||||
{
|
{
|
||||||
let unique = [];
|
let unique = [];
|
||||||
input.forEach((c) => {
|
input.forEach((c) =>
|
||||||
if (!unique.includes(c)) {
|
{
|
||||||
unique.push(c);
|
if (!unique.includes(c))
|
||||||
|
{
|
||||||
|
unique.push(c);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return unique;
|
return unique;
|
||||||
|
@ -246,11 +247,11 @@ function processPotaSchedule(buffer)
|
||||||
// Sanity dedupe checks
|
// Sanity dedupe checks
|
||||||
for (const key in g_pota.callSchedule)
|
for (const key in g_pota.callSchedule)
|
||||||
{
|
{
|
||||||
g_pota.callSchedule[key] = uniqueArrayFromArray(g_pota.callSchedule[key]);
|
g_pota.callSchedule[key] = uniqueArrayFromArray(g_pota.callSchedule[key]);
|
||||||
}
|
}
|
||||||
for (const key in g_pota.parkSchedule)
|
for (const key in g_pota.parkSchedule)
|
||||||
{
|
{
|
||||||
g_pota.parkSchedule[key] = uniqueArrayFromArray(g_pota.parkSchedule[key]);
|
g_pota.parkSchedule[key] = uniqueArrayFromArray(g_pota.parkSchedule[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
rebuildParks();
|
rebuildParks();
|
||||||
|
|
|
@ -423,7 +423,7 @@ function potaColumnHover(callObj)
|
||||||
{
|
{
|
||||||
if (callObj.pota[i] in window.opener.g_pota.parks)
|
if (callObj.pota[i] in window.opener.g_pota.parks)
|
||||||
{
|
{
|
||||||
value += callObj.pota[i] + " - " + window.opener.g_pota.parks[callObj.pota[i]].name + "\n";
|
value += callObj.pota[i] + " - " + window.opener.g_pota.parks[callObj.pota[i]].name + "\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
|
Ładowanie…
Reference in New Issue