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

-40
View File
@@ -451,43 +451,3 @@ test('labels publish committed anchors to the shared overlay and follow selectio
h.rendering.destroy();
assert.equal(h.overlay.calls.at(-1), afterClear[1]);
});
test('a double-click follows a storm’s points and zooms to its tracks and cones, as their entities did', async () => {
const h = harness();
await h.rendering.setSnapshot({ storms: [storm()] });
for (const id of h.sets.points.items.keys()) {
const target = h.rendering.followTargetFor(h.hit('points', id));
assert.ok(target?.position, `${id} is followed`);
assert.equal(target.key, `${h.sets.points.spec.id}:${id}`);
}
const center = h.rendering
.followTargetFor(h.hit('points', 'cyclone:ep152026:center'))
.position();
const want = fromDegrees(179, 15, 0);
assert.ok(
Math.hypot(center.x - want.x, center.y - want.y, center.z - want.z) < 1e-6,
);
for (const kind of ['lines', 'cones'])
for (const id of h.sets[kind].items.keys()) {
const target = h.rendering.followTargetFor(h.hit(kind, id));
assert.ok(target?.zoomTo?.radius > 0, `${id} is zoomed to`);
}
assert.equal(
h.rendering.followTargetFor({
set: 'other:points',
id: 'cyclone:ep152026:center',
surface: false,
}),
null,
);
const key = `${h.sets.points.spec.id}:cyclone:ep152026:center`;
assert.equal(h.rendering.drawsFollowKey(key), true);
assert.equal(h.rendering.drawsFollowKey(`other:points:x`), false);
h.rendering.clear();
assert.equal(h.rendering.drawsFollowKey(key), false, 'cleared: not drawn');
assert.equal(
h.rendering.followTargetFor(h.hit('points', 'cyclone:ep152026:center')),
null,
);
h.rendering.destroy();
});