fix(sat): the locator was already set, and the map was on top of everything
Two things reported together on the new tab. The locator: the station's is on the ACTIVE PROFILE, not in a settings key. keyStationMyGrid is a legacy key that EnsureDefault migrated into the profile long ago and nothing writes any more, so reading it told an operator with a perfectly good locator on screen that he had not set one — and refused every pass prediction on the strength of it. The map: Leaflet stacks its panes and controls up to z-index 1000, which without a stacking context of their own float over the whole application — Preferences opened behind the map, its Save and Close buttons under it. The other three maps in OpsLog each carry `isolate` for exactly this reason; this one was missing it.
This commit is contained in:
+9
-2
@@ -339,8 +339,15 @@ func (a *App) SaveSatSettings(s SatSettings) error {
|
||||
func (a *App) satObserver() (sat.Observer, error) {
|
||||
set := a.satSettings()
|
||||
grid := set.Grid
|
||||
if grid == "" && a.settings != nil {
|
||||
grid, _ = a.settings.Get(a.ctx, keyStationMyGrid)
|
||||
if grid == "" && a.profiles != nil {
|
||||
// The station locator lives on the ACTIVE PROFILE, not in a settings key.
|
||||
// keyStationMyGrid is a legacy key that EnsureDefault migrated into the
|
||||
// profile years ago and nothing writes any more — reading it told an
|
||||
// operator with a perfectly good locator on screen that he had not set
|
||||
// one.
|
||||
if p, err := a.profiles.Active(a.ctx); err == nil {
|
||||
grid = p.MyGrid
|
||||
}
|
||||
}
|
||||
grid = strings.TrimSpace(grid)
|
||||
lat, lon, ok := gridToLatLon(grid)
|
||||
|
||||
@@ -415,8 +415,12 @@ export function SatellitePanel({ myGrid }: { myGrid: string }) {
|
||||
{err && <div className="px-2 text-[11px] text-danger shrink-0">{err}</div>}
|
||||
|
||||
<div className="flex gap-1 flex-1 min-h-0">
|
||||
{/* The map. */}
|
||||
<div className="flex-1 min-w-0 rounded-lg overflow-hidden border border-border">
|
||||
{/* The map. isolate is load-bearing, not tidiness: Leaflet stacks its
|
||||
own panes and controls up to z-index 1000, which without a stacking
|
||||
context of their own float over Preferences and every dialog in the
|
||||
app — the map ends up on top of the very buttons that would close
|
||||
it. */}
|
||||
<div className="relative isolate z-0 flex-1 min-w-0 rounded-lg overflow-hidden border border-border">
|
||||
<div ref={divRef} className="h-full w-full" />
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user