mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 17:52:21 +00:00
Never act on what lies under a mission label when it is clicked
A click on a Space Missions label reaches every click subscriber so they can let go of their selection, but the layers that test their own painted cards or pick the scene themselves still found what lay under the label: CCTV turned that camera on, FIRMS and Vessels selected and flew to theirs, News and Wildlife Sightings opened their item, Perimeters, Ghost Maps and Shipwrecks opened the card's link, ALPR selected its reader, and Local ADS-B drilled the scene itself and selected the aircraft. Each now skips its own test on such a click, and Local ADS-B drills through the click, so the click only releases selections, as a click on empty map or another layer's contact does. Ordinary clicks behave as before. Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
1 parent
8675ead171
commit
5feac417d6
22 files changed
+453
-72
No files matched your search
@@ -483,16 +483,18 @@ export function createSelection({ state, services, parts }) {
|
||||
if (!state.enabled || services.pointer?.isPointerFree?.() === false)
|
||||
return;
|
||||
const at = click.screenPosition;
|
||||
// A click a label painted over the cards took is not on a card.
|
||||
const hit =
|
||||
overlay?.hitTest?.(at?.x, at?.y, {
|
||||
!click.overlay &&
|
||||
(overlay?.hitTest?.(at?.x, at?.y, {
|
||||
sourceId: WILDLIFE_SELECTED_SOURCE_ID,
|
||||
}) ||
|
||||
overlay?.hitTest?.(at?.x, at?.y, {
|
||||
sourceId: WILDLIFE_OVERLAY_SOURCE_ID,
|
||||
}) ||
|
||||
overlay?.hitTest?.(at?.x, at?.y, {
|
||||
sourceId: WILDLIFE_LABEL_SOURCE_ID,
|
||||
});
|
||||
overlay?.hitTest?.(at?.x, at?.y, {
|
||||
sourceId: WILDLIFE_OVERLAY_SOURCE_ID,
|
||||
}) ||
|
||||
overlay?.hitTest?.(at?.x, at?.y, {
|
||||
sourceId: WILDLIFE_LABEL_SOURCE_ID,
|
||||
}));
|
||||
if (hit) {
|
||||
hit.entry?.activate?.();
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user