mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
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:
1 parent
4f24b9a062
commit
c99c577b3e
2 files changed
+16
-4
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user