mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-24 04:02:19 +00:00
fix(recent-imagery): keep a slot's halves in place when its probe changes them
- A probe that narrows or widens a dateline slot keeps the layer of the half that stays; a new half is inserted right above it, so in A/B without a split one day stays on top on both sides of ±180. - A VIIRS dateline box drapes nothing without per-half evidence, so a replacement source without presentBoxes cannot drape an empty black side. - The loader keeps the halves confirmed empty; DETAILS says partial for a confirmed-empty side and unknown for a side that did not answer. - mount adds parts without a rollback; unused Cesium test fakes are gone.
This commit is contained in:
1 parent
5555aba82c
commit
e71ed72272
9 files changed
+164
-77
No files matched your search
@@ -23,48 +23,6 @@ export const FIJI_BOX = Object.freeze({
|
||||
north: -17,
|
||||
});
|
||||
|
||||
/** A provider whose tile requests stay pending until the test settles them. */
|
||||
class UrlTemplateImageryProvider {
|
||||
constructor(options) {
|
||||
this.options = options;
|
||||
this.calls = [];
|
||||
this.pending = [];
|
||||
}
|
||||
requestImage(x, y, level) {
|
||||
this.calls.push([x, y, level]);
|
||||
return new Promise((resolve) => this.pending.push(resolve));
|
||||
}
|
||||
}
|
||||
|
||||
export function fakeCesium(requestImage) {
|
||||
class Provider extends UrlTemplateImageryProvider {}
|
||||
if (requestImage) Provider.prototype.requestImage = requestImage;
|
||||
return {
|
||||
UrlTemplateImageryProvider: Provider,
|
||||
WebMercatorTilingScheme: class {},
|
||||
Rectangle: {
|
||||
fromDegrees: (west, south, east, north) => ({ west, south, east, north }),
|
||||
},
|
||||
SplitDirection: { LEFT: -1, NONE: 0, RIGHT: 1 },
|
||||
};
|
||||
}
|
||||
|
||||
export function fakeCollection() {
|
||||
const layers = [];
|
||||
return {
|
||||
layers,
|
||||
addImageryProvider(provider) {
|
||||
const layer = { provider, alpha: 1, splitDirection: 0 };
|
||||
layers.push(layer);
|
||||
return layer;
|
||||
},
|
||||
remove(layer, destroy) {
|
||||
layers.splice(layers.indexOf(layer), 1);
|
||||
layer.destroyed = destroy;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const settle = () => new Promise((resolve) => setTimeout(resolve, 0));
|
||||
|
||||
/** Timers that fire only when the test says so. */
|
||||
|
||||
Reference in new issue
Block a user