Street Level: a posted view whose camera was taken stands down whole again

Applying the rest of a posted view after the camera was taken during its
terrain wait still let it change the camera: stop_tracking dropped a follow
the user had just started, and annotate_map framed the view's marks. A
camera taken during the wait now ends the view again, as before. The 2 s
terrain timeout and the per-view catch on the queue stay.
This commit is contained in:
German Khokhlov committed 2026-11-11 19:01:58 +04:00
1 parent 0ebc09079d
commit 71797427d6
4 files changed
+135 -23

No files matched your search

+16 -16
View File
@@ -500,7 +500,6 @@ export function installViews({
queue = queue
.then(async () => {
if (signal?.aborted) return;
let apply = run;
if (unplaced && view.street_level) {
// A terrain service that does not answer soon leaves the view's
// own estimate.
@@ -514,20 +513,21 @@ export function installViews({
.catch(() => null)
.finally(() => owner.stop());
if (signal?.aborted) return;
// Whoever takes the camera meanwhile (a drag, a search, the
// assistant) keeps it: the photos stand down, as when the camera
// is taken during the action, and the rest of the view applies.
if (owner.taken())
apply = (name, ...rest) =>
name === 'show_street_level'
? {
ok: false,
cancelled: true,
superseded: true,
error: 'The camera moved on before the photo opened',
}
: run(name, ...rest);
else if (point)
// Whoever takes the camera while the terrain answers (a drag, a
// search, the assistant) keeps it: the view stands down.
if (owner.taken()) {
post(
{
type: EMBED_APPLIED_MESSAGE,
id,
ok: false,
steps: [{ step: 'street_level', ok: false, superseded: true }],
},
replyOrigin,
);
return;
}
if (point)
view = createView({
...event.data.view,
street_level: { ...asked, ...point },
@@ -536,7 +536,7 @@ export function installViews({
const steps = await applyView(view, {
viewer,
dataManager,
run: apply,
run,
signal,
autoOpen,
});