mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(cyclones): evict prior shared selection on storm switch
Regression: explicit storm A→B→A keeps one active record. Reviewer finding: quanticsoul4772 (#847).
This commit is contained in:
1 parent
28f3243090
commit
a803be1af2
4 files changed
+29
-6
No files matched your search
@@ -79,8 +79,12 @@ export function createCyclonesLayer({
|
||||
return null;
|
||||
}
|
||||
selectedContextEntity ||= { show: true };
|
||||
const contextId = `cyclone:${storm.id}`;
|
||||
context.removeEntityContextsForLayer?.('weather-cyclones', {
|
||||
retainIds: new Set([contextId]),
|
||||
});
|
||||
const record = context.registerEntityContext?.(selectedContextEntity, {
|
||||
id: `cyclone:${storm.id}`,
|
||||
id: contextId,
|
||||
layerId: 'weather-cyclones',
|
||||
layerName: 'Cyclone advisories',
|
||||
source: 'NOAA NHC / CPHC',
|
||||
|
||||
Reference in new issue
Block a user