From ac36441102b1fa0895658a4e9a9cb898492f697c Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Fri, 10 Apr 2026 17:31:18 -0500 Subject: [PATCH] Remove grid squares toggle from rover planner page The rover page now shows only: station markers, band selector, propagation heatmap, and URL sharing. Grid overlay remains on the main /map page. --- assets/js/rover_map_hook.js | 18 ------------------ lib/microwaveprop_web/live/rover_live.ex | 24 +----------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/assets/js/rover_map_hook.js b/assets/js/rover_map_hook.js index 3aa2116a..372334da 100644 --- a/assets/js/rover_map_hook.js +++ b/assets/js/rover_map_hook.js @@ -1,13 +1,9 @@ -import { updateGridOverlay } from "./maidenhead_grid" - export const RoverMap = { mounted() { this.stations = [] this.stationMarkers = L.layerGroup() this.scoreOverlay = null this.gridLookup = new Map() - this.gridLayer = L.layerGroup() - this.gridVisible = true this.colorScale = [ { min: 80, r: 0, g: 255, b: 163 }, @@ -30,8 +26,6 @@ export const RoverMap = { this.map = map this.stationMarkers.addTo(map) - this.gridLayer.addTo(map) - updateGridOverlay(map, this.gridLayer) // Render pre-loaded propagation scores const initialScores = JSON.parse(this.el.dataset.scores || "[]") @@ -50,9 +44,6 @@ export const RoverMap = { map.on("moveend", () => { pushBounds() - if (this.gridVisible) { - updateGridOverlay(map, this.gridLayer) - } }) this.handleEvent("update_scores", ({ scores }) => { @@ -64,15 +55,6 @@ export const RoverMap = { this.renderStations() }) - this.handleEvent("toggle_grid", ({ visible }) => { - this.gridVisible = visible - if (visible) { - this.gridLayer.addTo(map) - updateGridOverlay(map, this.gridLayer) - } else { - this.gridLayer.remove() - } - }) }, // --- Propagation score overlay (same as main map) --- diff --git a/lib/microwaveprop_web/live/rover_live.ex b/lib/microwaveprop_web/live/rover_live.ex index c26c9688..f68e4c27 100644 --- a/lib/microwaveprop_web/live/rover_live.ex +++ b/lib/microwaveprop_web/live/rover_live.ex @@ -38,8 +38,7 @@ defmodule MicrowavepropWeb.RoverLive do resolving: false, url_loaded: false, initial_scores_json: Jason.encode!(initial_scores), - bounds: @initial_bounds, - grid_visible: true + bounds: @initial_bounds )} end @@ -99,17 +98,6 @@ defmodule MicrowavepropWeb.RoverLive do {:noreply, push_url(socket)} end - def handle_event("toggle_grid", _params, socket) do - visible = !socket.assigns.grid_visible - - socket = - socket - |> assign(:grid_visible, visible) - |> push_event("toggle_grid", %{visible: visible}) - - {:noreply, socket} - end - def handle_event("map_bounds", bounds, socket) do scores = Propagation.latest_scores(socket.assigns.band, bounds) @@ -224,16 +212,6 @@ defmodule MicrowavepropWeb.RoverLive do <% end %> - -