mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
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:
1 parent
4804097ca1
commit
830c980ca6
26 files changed
+1095
-69
No files matched your search
@@ -6,6 +6,7 @@ import { createPanoramaxProvider } from '../../layers/streetLevel/providers/pano
|
||||
import * as picking from '../../data/pickRegistry.js';
|
||||
import * as scenePick from '../../data/scenePick.js';
|
||||
import * as render from '../../renderGovernor.js';
|
||||
import { hitTestWorldOverlay } from '../../overlays/worldOverlay.js';
|
||||
|
||||
/** The browser Maps key the scene was started with (src/app/scene.js). */
|
||||
const googleApiKey = () => globalThis.window?.__GOOGLE_MAPS_API_KEY__ || null;
|
||||
@@ -35,6 +36,7 @@ export function createApplicationStreetLevel({
|
||||
}) {
|
||||
return createStreetLevelLayer({
|
||||
providers,
|
||||
services: { picking, scenePick, render },
|
||||
// Hit-testing lets a card painted over a near miss keep its click.
|
||||
services: { picking, scenePick, render, overlayHit: hitTestWorldOverlay },
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user