forked from MapComplete/MapComplete
Performance: sprinkle 'onDestroy' everywhere to cleanup old stores; cleanup 'Stores' utility class
This commit is contained in:
parent
66f093afd8
commit
81be4db044
79 changed files with 332 additions and 325 deletions
|
|
@ -90,14 +90,14 @@ export class AvailableRasterLayers {
|
|||
location: Store<{ lon: number; lat: number }>,
|
||||
enableBing?: Store<boolean>
|
||||
): Store<RasterLayerPolygon[]> {
|
||||
const availableLayersBboxes = Stores.ListStabilized(
|
||||
const availableLayersBboxes = Stores.listStabilized(
|
||||
location.mapD((loc) => {
|
||||
const eli = AvailableRasterLayers._editorLayerIndex
|
||||
const lonlat: [number, number] = [loc.lon, loc.lat]
|
||||
return eli.filter((eliPolygon) => BBox.get(eliPolygon).contains(lonlat))
|
||||
})
|
||||
)
|
||||
return Stores.ListStabilized(
|
||||
return Stores.listStabilized(
|
||||
availableLayersBboxes.mapD(
|
||||
(eliPolygons) => {
|
||||
const loc = location.data
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue