mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
fix(cockpit): a place pack that will not load ends the loading batch failed; flags keep their neighbours out from under the border and out of a scaled flag's edge; a new ride asks again for a sheet that failed
This commit is contained in:
1 parent
5a6cf22be1
commit
e954734379
16 files changed
+198
-55
No files matched your search
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
* The place packs in the top-centre loading status: they load lazily, on the
|
||||
* Cockpit's first place lookup (`src/data/placeBelow.js`), so while one is on
|
||||
* its way the status names them beside the layers, and a pack that would not
|
||||
* load makes the batch end LOAD FAILED.
|
||||
*/
|
||||
|
||||
import { placePacksStatus } from '../data/placeBelow.js';
|
||||
import { LOADING_NAME_KEYS } from './layerNames.js';
|
||||
|
||||
/**
|
||||
* The data layers, with the place packs as one more entry while they load
|
||||
* or after one would not load, so a batch they join ends LOAD FAILED rather
|
||||
* than LOAD COMPLETE.
|
||||
*/
|
||||
export function withPlacePacks(
|
||||
layers,
|
||||
{ loading, failed } = placePacksStatus(),
|
||||
) {
|
||||
if (!loading && !failed) return layers;
|
||||
return [
|
||||
...layers,
|
||||
{
|
||||
id: 'place-names',
|
||||
name: LOADING_NAME_KEYS['place-names'],
|
||||
enabled: true,
|
||||
stats: { loading, error: failed ? 'Place names did not load' : null },
|
||||
},
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user