mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 18:52:18 +00:00
Fix the follow-up review findings in import, layers, startup and engines
- KML/KMZ import: a per-file canvas budget and cache for ground overlays, limits on rings and vertices of raised polygons, overlays across 360° and near the poles, degenerate holes, polar and single-latitude fills, absolute overlays at their altitude, overlay order by drawOrder as on Cesium, and pins on tiles keep their measured height. - Points on the surface: OSM Places and Street Level cones share the surface sampler and sit on the terrain before they are measured, within a sampling budget per pass; Cockpit's contact-dot bank keeps the dot atlas, and a failed fleet model loads again after a pause. - Startup: the loading screen lifts after the share-link view is restored, the retry screen names the failed engine and takes focus, and the fallback toast stays for 6 s. - Engines: an engine switch lands a running camera flight at its destination (camera.completeFlight on both engines), the sighting card leaves focus on the engine picker after a switch, and a Cesium model error stays with the instance that failed. - The MCP panel builds again: its wind-mesh alias resolves to the stub. - QA: the wildlife switch waits for the camera to rest, GBFS --w2 says it needs the dev server, and test fixtures are shared instead of copied.
This commit is contained in:
1 parent
0ef29781e5
commit
60fb8fee07
82 files changed
+2363
-1574
No files matched your search
@@ -313,3 +313,61 @@ test('custom windows keep down synchronous, moves coalesced and clicks on one GP
|
||||
);
|
||||
destroy();
|
||||
});
|
||||
|
||||
test('a pinch whose still finger lifts first is not a click', async () => {
|
||||
const { canvas, input, destroy } = setup();
|
||||
let clicks = 0;
|
||||
input.on('click', () => clicks++);
|
||||
const touch = (type, id, x, y) =>
|
||||
pointer(type, x, y, {
|
||||
pointerId: id,
|
||||
pointerType: 'touch',
|
||||
isPrimary: id === 1,
|
||||
});
|
||||
canvas.dispatchEvent(touch('pointerdown', 1, 100, 300));
|
||||
canvas.dispatchEvent(touch('pointerdown', 2, 300, 300));
|
||||
// Only the first finger moves (a one-sided pinch).
|
||||
for (let i = 1; i <= 5; i++)
|
||||
canvas.dispatchEvent(touch('pointermove', 1, 100 - 20 * i, 300));
|
||||
canvas.dispatchEvent(touch('pointerup', 2, 300, 300));
|
||||
canvas.dispatchEvent(touch('pointerup', 1, 0, 300));
|
||||
await new Promise((resolve) => setTimeout(resolve, 50));
|
||||
assert.equal(clicks, 0);
|
||||
canvas.dispatchEvent(touch('pointerdown', 1, 100, 300));
|
||||
canvas.dispatchEvent(touch('pointercancel', 1, 100, 300));
|
||||
canvas.dispatchEvent(touch('pointerup', 1, 100, 300));
|
||||
await Promise.resolve();
|
||||
assert.equal(clicks, 0, 'a cancelled pointer cannot click');
|
||||
canvas.dispatchEvent(touch('pointerdown', 1, 100, 300));
|
||||
canvas.dispatchEvent(touch('pointerup', 1, 100, 300));
|
||||
await Promise.resolve();
|
||||
assert.equal(clicks, 1, 'the next single tap still clicks');
|
||||
destroy();
|
||||
});
|
||||
|
||||
test('a mouse released off the canvas does not hold back the next tap', async () => {
|
||||
const { canvas, input, destroy } = setup();
|
||||
let clicks = 0;
|
||||
input.on('click', () => clicks++);
|
||||
// The mouse goes down on the globe and up outside it.
|
||||
canvas.dispatchEvent(
|
||||
pointer('pointerdown', 100, 300, { pointerId: 1, isPrimary: true }),
|
||||
);
|
||||
canvas.dispatchEvent(
|
||||
pointer('pointerdown', 100, 300, {
|
||||
pointerId: 7,
|
||||
pointerType: 'touch',
|
||||
isPrimary: true,
|
||||
}),
|
||||
);
|
||||
canvas.dispatchEvent(
|
||||
pointer('pointerup', 100, 300, {
|
||||
pointerId: 7,
|
||||
pointerType: 'touch',
|
||||
isPrimary: true,
|
||||
}),
|
||||
);
|
||||
await Promise.resolve();
|
||||
assert.equal(clicks, 1);
|
||||
destroy();
|
||||
});
|
||||
Reference in new issue
Block a user