fix(touch): give each tap to the layer that acts on it

On a coarse pointer the dispatcher can name a contact near the tap instead
of the exact pick. Only flights, military, vessels, radio and Street Level
act on such a contact, so they now register as expanded pick owners, and a
quake card or label yields only to them. A FIRMS fire or CCTV camera reached
only as a nearby contact no longer swallows a quake card, a quake label or
a vessel's own card tap, and FIRMS and CCTV cards yield to a contact whose
layer does act on it.

Radio and Street Level also pick through their own windows. A station or
Street Level item found only there, not as the touch contact, yields to
another layer's card painted over it, and Street Level takes its own touch
contact beyond its narrower window.

Fire, CCTV and vessel cards now act over a passive owner's pick (a flight
trail, the directions route), as the quake card does. The Context panel
leaves a passive route, or a fire or camera reached only as a nearby
contact, to the card painted over it.
This commit is contained in:
manjunath22466 committed 2026-11-17 13:18:32 +05:30
1 parent 4804097ca1
commit 830c980ca6
26 files changed
+1095 -69

No files matched your search

+5 -1
View File
@@ -352,7 +352,11 @@ export function createEarthquakesLayer({
const pickId = picking.resolvePickId(hit);
const actedOn =
picking.isActedOnByOtherLayer ?? picking.isOwnedByOtherLayer;
if (pickId && actedOn(EARTHQUAKES_LAYER_ID, pickId)) return;
// Exact-only handlers cannot act on a nearby touch hit. Compare ids,
// since the dispatcher may expose distinct objects for the same pick.
const expanded =
'topHit' in click && picking.resolvePickId(click.topHit) !== pickId;
if (pickId && actedOn(EARTHQUAKES_LAYER_ID, pickId, { expanded })) return;
const cardHit = overlayHost.hitTest?.(at?.x, at?.y, {
sourceId: EARTHQUAKE_CARD_SOURCE_ID,
});