Preserve detail panel and range circle across score updates

- Add phx-update="ignore" to detail-panel so LiveView patches don't wipe it
- Re-request point_detail after scores update to refresh with new data
- Range circles persist across updates since they're on a separate layer
This commit is contained in:
Graham McIntire 2026-03-31 16:28:38 -05:00
parent 8949920b7f
commit c775eb2611
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59
2 changed files with 7 additions and 1 deletions

View file

@ -329,6 +329,11 @@ export const PropagationMap = {
this.handleEvent("update_scores", ({ scores }) => {
topbar.hide()
this.renderScores(scores)
// If a point was selected, refresh its detail with the new data
if (this.clickedLatLng && this.detailPanel && this.detailPanel.style.display !== "none") {
this.pushEvent("point_detail", { lat: this.clickedLatLng[0], lon: this.clickedLatLng[1] })
}
})
this.bandInfo = JSON.parse(this.el.dataset.bandInfo || "{}")

View file

@ -280,9 +280,10 @@ defmodule MicrowavepropWeb.MapLive do
</div>
</div>
<%!-- Point detail panel (populated by JS on click) --%>
<%!-- Point detail panel (populated by JS on click, ignored by LiveView patches) --%>
<div
id="detail-panel"
phx-update="ignore"
class="bg-neutral text-neutral-content shadow rounded-box border border-base-300 overflow-hidden"
style="display:none;"
>