From be0cbbb64b18879f2abeb5db00f25325d6da162b Mon Sep 17 00:00:00 2001 From: Roby Date: Sun, 25 Oct 2026 12:42:55 +0100 Subject: [PATCH] fix scroll home --- static/js/app.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/js/app.js b/static/js/app.js index daf16be..e0b61ea 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -28,6 +28,9 @@ function switchView(viewName) { document.getElementById(`tab-${viewName}`).classList.add('active'); localStorage.setItem('fleetDefaultView', viewName); + // Riporta la pagina in cima con un'animazione fluida + window.scrollTo({ top: 0, behavior: 'smooth' }); + if (viewName === 'nodes') { applyViewMode(); } else if (viewName === 'map') { setTimeout(() => {