Refresh viewshed on band change when a point is selected

This commit is contained in:
Graham McIntire 2026-04-13 09:41:58 -05:00
parent abd35127c7
commit 87119c33e1
No known key found for this signature in database
GPG key ID: F4ABF488E6029E59

View file

@ -727,6 +727,17 @@ export const PropagationMap: Record<string, unknown> & {
this.handleEvent("update_band_info", ({ band_info }: { band_info: BandInfo }) => {
this.bandInfo = band_info
// Viewshed depends on freq + score-derived range, so recompute it when
// the band changes if a point is still selected. update_scores already
// handles the heatmap, reach polygon, and detail panel refresh.
if (this.clickedLatLng && this.detailPanel && this.detailPanel.style.display !== "none") {
this.viewshedLoading = true
this.pushEvent("compute_viewshed", {
lat: this.clickedLatLng[0],
lon: this.clickedLatLng[1]
})
}
})
// Prevent control panel / sidebar from eating map clicks/scrolls