Refresh viewshed on band change when a point is selected
This commit is contained in:
parent
abd35127c7
commit
87119c33e1
1 changed files with 11 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue