mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-25 05:09:49 -06:00
fix legendless bug
This commit is contained in:
@@ -239,9 +239,12 @@ function makeLegend() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function updateLegend(shotcount = undefined) {
|
function updateLegend(shotcount = undefined) {
|
||||||
|
if (!useLegend) return;
|
||||||
|
try {
|
||||||
document.getElementById(
|
document.getElementById(
|
||||||
"shotCounter"
|
"shotCounter"
|
||||||
).textContent = `Previous update created ${shotcount} migrations`;
|
).textContent = `Previous update created ${shotcount} migrations`;
|
||||||
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
const space_coords = [43.09224, -77.674799];
|
const space_coords = [43.09224, -77.674799];
|
||||||
@@ -395,9 +398,11 @@ function updateCountdown() {
|
|||||||
countdownTo = now + 5 * 60 * 1000;
|
countdownTo = now + 5 * 60 * 1000;
|
||||||
getUpdate();
|
getUpdate();
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
document.getElementById("countdownClock").textContent = Math.floor(
|
document.getElementById("countdownClock").textContent = Math.floor(
|
||||||
countdown / 1000
|
countdown / 1000
|
||||||
);
|
);
|
||||||
|
} catch {}
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getUpdate() {
|
async function getUpdate() {
|
||||||
@@ -531,7 +536,7 @@ function getShots(nodes) {
|
|||||||
return shots;
|
return shots;
|
||||||
}
|
}
|
||||||
|
|
||||||
const useLegend = window.location.pathname.replaceAll("/", "") == "hotspots"
|
const useLegend = window.location.pathname.replaceAll("/", "") == "hotspots";
|
||||||
init(useLegend).then(() => {
|
init(useLegend).then(() => {
|
||||||
// map.on("click", () => {
|
// map.on("click", () => {
|
||||||
// shootVector(pts[2], pts[8]);
|
// shootVector(pts[2], pts[8]);
|
||||||
|
|||||||
Reference in New Issue
Block a user