mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
fix(recent-imagery): keep drapes and proven halves steady across re-probes
- The renderer compares the rectangles it actually drapes, so a probe that confirms the same halves no longer rebuilds a shown layer. - A re-probe of a present day keeps a side it proved earlier through a transient failure and drops it only on fresh empty evidence. - DETAILS shows partial coverage when a side is confirmed empty; the presentBoxes contract of the source is documented. - probeHalf, the presentBoxes filter, requestBoxes and mount are simplified; the frozen-response Proxy is gone. - Duplicate source tests move into their own suites and share the existing fixtures; tests pin the exact ±180 seam and the dateline refusals. - Comments, CURRENT-STATE and the changelog fragment are shortened and match the JPEG / PNG drape rules.
This commit is contained in:
1 parent
ccffaeca4d
commit
fc137bef85
21 files changed
+715
-1093
No files matched your search
@@ -4,9 +4,11 @@ import assert from 'node:assert/strict';
|
||||
import { assertSameNode } from '../testSupport/domAssert.mjs';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { createRecentImageryPanel } from './recentImagery.js';
|
||||
import { nonCrossingBoxes } from '../layers/recentImagery/model.js';
|
||||
import { createRecentImageryLayer } from '../layers/recentImagery/index.js';
|
||||
import {
|
||||
BOX,
|
||||
FIJI_BOX,
|
||||
fakeCatalog,
|
||||
fakeController,
|
||||
fakeRenderer,
|
||||
@@ -1055,6 +1057,20 @@ test('DETAILS is a collapsed rail card holding every note, and the empty-days to
|
||||
assert.equal(article.dataset.open, 'false');
|
||||
});
|
||||
|
||||
test('DETAILS shows partial coverage when a present dateline day drapes one half', async () => {
|
||||
const f = fixture();
|
||||
f.layer.enable();
|
||||
f.layer.setBox(FIJI_BOX);
|
||||
f.catalog.resolveLast();
|
||||
await settle();
|
||||
assert.match(f.byId('ri-details').textContent, /Coverage full/);
|
||||
const get = f.thumbnails.get;
|
||||
const [west] = nonCrossingBoxes(FIJI_BOX);
|
||||
f.thumbnails.get = (key) => ({ ...get(key), availableBoxes: [west] });
|
||||
f.thumbnails.probe(f.snap().focus.key, 'present');
|
||||
assert.match(f.byId('ri-details').textContent, /Coverage partial/);
|
||||
});
|
||||
|
||||
test('the body scroll position survives renders even when DOM mutations reset it', async () => {
|
||||
const f = fixture();
|
||||
await f.ready();
|
||||
|
||||
Reference in new issue
Block a user