From 74eb8e55e3d49001c11fe0a72e77f6853bce8887 Mon Sep 17 00:00:00 2001 From: Caleb Denio Date: Tue, 22 Sep 2026 16:54:26 -0600 Subject: [PATCH] small improvement --- static/index.html | 2 +- static/js/main.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/static/index.html b/static/index.html index 692dfd5..75f3b56 100644 --- a/static/index.html +++ b/static/index.html @@ -300,6 +300,6 @@ - + diff --git a/static/js/main.js b/static/js/main.js index e0a5310..d6e8c0f 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -274,10 +274,10 @@ function renderVehicle(vehicle) { : 3000, icon: renderVehicleIcon(vehicle), }).bindPopup(vehiclePopupContent(vehicle)).on("popupopen", () => { + for (const layer of railLayer.getLayers()) { + layer.setStyle({ opacity: 0.2 }); + } getTripShape(vehicle.shape_id).then(shape => { - for (const layer of railLayer.getLayers()) { - layer.setStyle({ opacity: 0.2 }); - } L.polyline(shape, { color: `#${vehicle.route.color}`, zIndexOffset: 10 }).addTo(currentRouteLayer); }) }).on("popupclose", () => {