From 3d290d47ecd4dcfde65ab3ff9d6291ba87a97fae Mon Sep 17 00:00:00 2001 From: root <165865819+brianshea2@users.noreply.github.com> Date: Sat, 28 Sep 2024 18:46:04 +0000 Subject: [PATCH] set marker opacity based on last seen time --- website/index.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/index.html b/website/index.html index f812d87..bb06a32 100644 --- a/website/index.html +++ b/website/index.html @@ -239,7 +239,9 @@ }) } const position = L.latLng([latitude, longitude].map(x => x / 10000000)) - const tooltipContent = `${html(longName)} (${html(shortName)}) ${since(Math.max(...Object.values(seenBy)))}` + const lastSeen = Math.max(...Object.values(seenBy)) + const opacity = 1.0 - (Date.now() / 1000 - lastSeen) / 172800 + const tooltipContent = `${html(longName)} (${html(shortName)}) ${since(lastSeen)}` const popupContent = `