fix(input): no double-click follow or zoom on the map

The globe viewer's own double-click tracked a picked entity with a
position or zoomed to one without. Layers moving onto the draw port had it
re-created one by one (data/stockFollow.js); following is a click in GEV,
so the viewer's handler is removed where the viewer is made and every
re-creation goes: earthquakes, cyclones, air quality, news, perimeters,
drone airspace, ghost maps, places, radio, cables, CCTV, ALPR, launches,
bikeshare, Local ADS-B, installations, directions, trails, data packs,
annotations, the library's view and local GeoJSON. The Cockpit's own
double-click and the draw tool's finishing double-click stay.
This commit is contained in:
Sameh Khamis committed 2026-11-14 09:10:14 -08:00
1 parent bb2d22dbce
commit b86014244d
69 files changed
+94 -2797

No files matched your search

-13
View File
@@ -1,7 +1,6 @@
import { isPointerFree } from '../../data/inputOwnership.js';
import { inputFor } from '../../input/dispatcher.js';
import { canvasOf, findCamera, findFrame } from '../../render/rendererOf.js';
import { followOnDoubleClick } from '../../data/stockFollow.js';
import { worldClock } from '../../time/worldClock.js';
const HOVER_PICK_INTERVAL_MS = 120;
@@ -204,20 +203,9 @@ export function createLifecycle({
launchAt: parts.rendering.launchMarkerAt,
});
const unsubscribeHover = input.onPointer('move', hover.move);
// A double-click follows a mission point, as the default renderer
// followed the missions' entities.
layerState._stockFollow = followOnDoubleClick({
viewer,
inputFor: () => input,
name: 'rocket-launches',
enabled: () => layerState._enabled && parts.rendering.missionsShown(),
targetFor: parts.rendering.followTargetFor,
});
layerState._inputSubscription = () => {
unsubscribeClick();
unsubscribeHover();
layerState._stockFollow?.destroy();
layerState._stockFollow = null;
};
// Apply horizon visibility before the renderer draws and picks.
// A postRender write is one frame late and can remain visibly stale when
@@ -307,7 +295,6 @@ export function createLifecycle({
layerState._cameraReleased = true;
parts.selection.stopMissionZoomAnchor();
parts.rendering.showMissions(false);
layerState._stockFollow?.stop();
parts.orbitRendering.syncMissionOrbitPrimitiveVisibility();
const canvas = canvasOf(layerState._viewer);
if (canvas) canvas.style.cursor = '';