fix(touch): keep radio and Street Level contacts under a card

Under another layer's card, radio and Street Level yielded whenever their
own pick window found an item that was not the tap's touch contact. If the
contact was a different station or Street Level item of theirs, the card
yielded to that contact too, and the tap did nothing. Under a card they now
act on their own touch contact, and still yield when the contact is not
theirs. On bare map the window keeps its precedence.
This commit is contained in:
manjunath22466 committed 2026-11-17 17:18:27 +05:30
1 parent 54fd3d3bed
commit 99bd0443cd
5 files changed
+76 -5

No files matched your search

+6 -1
View File
@@ -36,9 +36,14 @@ export function createSelection({ state, parts }) {
// Found only through our window, not as the contact (which is the exact
// hit whenever there is one): another layer's card or label painted here
// is that layer's click, since its handler never sees this window.
// An item of ours that is the contact is still ours: that card yields
// to it.
if (route && windowId !== contactId) {
const at = event.screenPosition;
if (state.services.overlayHit?.(at?.x, at?.y)) return;
if (state.services.overlayHit?.(at?.x, at?.y)) {
route = contactId ? parts.router.resolve(contactId) : null;
if (!route) return;
}
}
if (!route && contactId) route = parts.router.resolve(contactId);
// Not ours: the ground handler decides whether it is the map itself.