fix(trails, data-packs): a scene with no page to take input from draws without a double-click

The double-click follow asked for the scene's input when a set was first
drawn. On a headless scene Cesium's event handler needs a document, so
drawing a trail or a pack threw there. Asking is guarded, as Directions
does: a scene that cannot take input has no double-click.
This commit is contained in:
Sameh Khamis committed 2026-11-14 01:55:35 -08:00
1 parent 4f24b9a062
commit c99c577b3e
2 files changed
+16 -4

No files matched your search

+8 -2
View File
@@ -61,8 +61,14 @@ function joinDoubleClick(viewer, setId, lineFor) {
let shared = doubleClicks.get(viewer);
if (!shared) {
const lines = new Map();
// A scene that takes no input has no double-click.
const input = findInput(viewer);
// A scene that takes no input (or a headless one, with no page to take
// it from) has no double-click.
let input = null;
try {
input = findInput(viewer);
} catch {
input = null;
}
shared = {
lines,
follow: input