mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
fix(earthquakes): address review follow-ups on click arbitration
A drifting touch tap or a cockpit-mode tap on a fire, quake or vessel card
beside an aircraft did nothing: the cards deferred to the aircraft, whose
click handler ignores such taps. Pick owners can now declare the clicks
they ignore (registerPickOwner(..., { declinesClick })); flights and
military decline a drag or a cockpit tap and CCTV declines any click that
is not clean, so a card over them keeps that tap.
Also from review:
- the selected quake's contour rings sit on the ground the disc is draped
on, re-read through the heights service while they paint;
- a label's fly-to frames the whole disc for large quakes;
- a quake that ages out of the feed clears its selection as evicted;
- id-less quakes are named by their content, not their row;
- the Bhote Koshi trigger-record callout opens its source on a click, as
its keyboard action does, and yields like the other cards;
- the card's place line is cut to 48 characters, its link hint shows only
with an opener, and its accessible name carries depth, place and time; a
link-less card's click and keyboard action fly to the quake;
- camera trace comparison scales its tolerance with the value and wraps
heading and roll.
This commit is contained in:
1 parent
fde5f95b45
commit
7312280817
33 files changed
+702
-76
No files matched your search
@@ -206,6 +206,29 @@ test('fires frame wider than vessels — a fire is read by its surroundings', ()
|
||||
);
|
||||
});
|
||||
|
||||
// A large quake's disc does not fit the earthquake framing, so the target
|
||||
// asks for more room; it never gets less than the framing.
|
||||
test('a target can widen its framing, never narrow it', () => {
|
||||
const fly = (extra) => {
|
||||
const camera = stubCamera();
|
||||
flyToWorldTarget(bindFakeCesiumCamera({ camera }), {
|
||||
kind: 'earthquake',
|
||||
id: 'earthquake:us1',
|
||||
position: POSITION,
|
||||
...extra,
|
||||
});
|
||||
return camera.calls.flights[0];
|
||||
};
|
||||
const m72 = fly({ radiusM: 147000, rangeM: 514000 });
|
||||
assert.equal(m72.sphere.radius, 147000);
|
||||
assert.equal(m72.options.offset.range, 514000);
|
||||
const m3 = fly({ radiusM: 8000, rangeM: 28000 });
|
||||
assert.equal(m3.sphere.radius, WORLD_FOCUS_FRAMING.earthquake.radiusM);
|
||||
assert.equal(m3.options.offset.range, WORLD_FOCUS_FRAMING.earthquake.rangeM);
|
||||
const bad = fly({ radiusM: NaN, rangeM: -1 });
|
||||
assert.equal(bad.options.offset.range, WORLD_FOCUS_FRAMING.earthquake.rangeM);
|
||||
});
|
||||
|
||||
test('every framing is a real oblique standoff, not a nadir or an inside-out sphere', () => {
|
||||
const kinds = Object.keys(WORLD_FOCUS_FRAMING);
|
||||
assert.deepEqual(kinds.sort(), [
|
||||
|
||||
Reference in new issue
Block a user