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
+12
-4
@@ -18,8 +18,9 @@ export const WORLD_FOCUS_FRAMING = Object.freeze({
|
||||
// A stopped train's one fly-to, and the frame a moving train is followed
|
||||
// in (src/layers/rail/follow.js): the train and the track either side.
|
||||
train: Object.freeze({ radiusM: 200, rangeM: 2500, pitchDeg: -35 }),
|
||||
// A clicked quake's magnitude label: its disc (2^M km across, so about
|
||||
// 11 km at M2.5 and 128 km at M6) and the ground around it.
|
||||
// A clicked quake's magnitude label: its disc (2^M km in radius, so about
|
||||
// 6 km at M2.5 and 64 km at M6) and the ground around it. A larger quake
|
||||
// passes its own radius and range (never less than these).
|
||||
earthquake: Object.freeze({ radiusM: 20000, rangeM: 220000, pitchDeg: -45 }),
|
||||
'sighting-area': Object.freeze({
|
||||
radiusM: 11000,
|
||||
@@ -115,13 +116,20 @@ export function flyToWorldTarget(viewer, target = {}) {
|
||||
target.durationSec > 0
|
||||
? target.durationSec
|
||||
: WORLD_CLICK_FOCUS_DURATION_SEC;
|
||||
// A target may ask for more room than its kind's framing (a large quake's
|
||||
// disc), never less.
|
||||
const atLeast = (value, floor) =>
|
||||
Number.isFinite(value) && value > floor ? value : floor;
|
||||
camera.flyToBounds(
|
||||
{ center: target.position, radius: framing.radiusM },
|
||||
{
|
||||
center: target.position,
|
||||
radius: atLeast(target.radiusM, framing.radiusM),
|
||||
},
|
||||
{
|
||||
offset: {
|
||||
heading,
|
||||
pitch: toRadians(framing.pitchDeg),
|
||||
range: framing.rangeM,
|
||||
range: atLeast(target.rangeM, framing.rangeM),
|
||||
},
|
||||
durationS: duration,
|
||||
easing: 'cubicInOut',
|
||||
|
||||
Reference in new issue
Block a user