stufffffffff

This commit is contained in:
cjdenio committed 2026-02-16 22:44:51 -07:00
1 parent cc3ec73be7
commit ff3c151e9d
3 files changed
+38 -12

No files matched your search

+12 -3
View File
@@ -85,6 +85,8 @@ protobuf.load("/schema.proto").then((root) => {
document.getElementById("count-frontrunner").innerText = totals.frontrunner.toString()
}
let bannerVisible = false
async function reload() {
const bin = await fetch("/api").then((r) => r.arrayBuffer());
const { vehicles, info } = root
@@ -96,10 +98,17 @@ protobuf.load("/schema.proto").then((root) => {
populateTotals(vehicles)
if (vehicles.length == 0) {
document.getElementById("banner").classList.remove("hidden")
map.invalidateSize()
if (!bannerVisible) {
document.getElementById("banner").classList.remove("hidden")
bannerVisible = true
map.invalidateSize()
}
} else {
document.getElementById("banner").classList.add("hidden")
if (bannerVisible) {
document.getElementById("banner").classList.add("hidden")
bannerVisible = false
map.invalidateSize()
}
}
// render vehicles on map