mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 16:22:20 +00:00
fix(street-level): /revmain cleanup after the slim rebuild
- Google 3D: the OPEN button re-measures a ground whose tiles are still loading (a few times, a second apart) and on a map change, not only after the next camera move. - Mapillary: two mounts on one host during the first download share one build instead of leaking a second WebGL viewer. - Retired floating-panel keys (v8 panelPos, panelFloatHintShown) are dropped from localStorage; dead inline-position resets, the drag JSDoc and the dead qa-ui-disposal observer branch are gone. - Docs: z ladder, panel chrome, position storage and the fixture gate's actual coverage; changelog fragment for #974 (old .gev-cache/mapillary can be deleted). - ru/es: the layer is named as everywhere else in the UI. - Fixtures and test fakes: unused exports removed; a fake credit removal of an absent credit no longer drops another one; the tile test reset frees upstream slots. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
00e8e3b997
commit
28e0ba7104
22 files changed
+220
-74
No files matched your search
@@ -21,6 +21,8 @@ export function createMapillaryViewer({ source, render } = {}) {
|
||||
let viewer = null;
|
||||
let Library = null;
|
||||
let container = null;
|
||||
/** The viewer being built for a host: a second mount joins it, not a twin. */
|
||||
let building = null;
|
||||
let pendingOpen = null;
|
||||
/** Bumped by `unmount`, so a construction it overtook builds nothing. */
|
||||
let generation = 0;
|
||||
@@ -100,8 +102,17 @@ export function createMapillaryViewer({ source, render } = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
async function ensureViewer(host) {
|
||||
if (viewer && container === host) return viewer;
|
||||
function ensureViewer(host) {
|
||||
if (viewer && container === host) return Promise.resolve(viewer);
|
||||
if (building?.host === host) return building.promise;
|
||||
const promise = buildViewer(host).finally(() => {
|
||||
if (building?.promise === promise) building = null;
|
||||
});
|
||||
building = { host, promise };
|
||||
return promise;
|
||||
}
|
||||
|
||||
async function buildViewer(host) {
|
||||
const built = generation;
|
||||
destroyViewer();
|
||||
const { Viewer } = await ensureLibrary();
|
||||
@@ -177,6 +188,7 @@ export function createMapillaryViewer({ source, render } = {}) {
|
||||
pendingOpen = null;
|
||||
// A build still waiting for the library gives up when it arrives.
|
||||
generation++;
|
||||
building = null;
|
||||
destroyViewer();
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user