fix(camera): moveEnd fires during a follow once the eye stands still, as Cesium's did

Cesium raised moveEnd 500 ms after the camera last moved, following or
not: a followed target that moves keeps the eye moving, and one that
stands still (a marker, a parked aircraft) lets the move end once
the user stops orbiting it. The port never raised moveEnd while
following, so Weather, Recent Imagery, the share link and every other
moveEnd listener stopped catching up around a still target. The rule is
now the eye's alone, through the shared camera events.
This commit is contained in:
Sameh Khamis committed 2026-11-14 00:46:51 -08:00
1 parent 63a6595eaf
commit 5d48503c51
6 files changed
+25 -28

No files matched your search

+1 -7
View File
@@ -9,14 +9,12 @@ const view = (x) => ({
up: { x: 0, y: 0, z: 1 },
});
test('moveStart on a change, moveEnd once nothing moved for 500 ms and nothing is followed', () => {
test('moveStart on a change, moveEnd once nothing moved for 500 ms', () => {
let eye = view(7e6);
let following = false;
const seen = [];
const events = createCameraEvents({
pose: () => eye,
world: () => eye,
following: () => following,
report: (error) => assert.fail(error),
});
events.on('moveStart', () => seen.push('start'));
@@ -34,11 +32,7 @@ test('moveStart on a change, moveEnd once nothing moved for 500 ms and nothing i
assert.deepEqual(seen, ['start']);
events.stepMoveDetection(400 + MOVE_END_WAIT_MS - 1);
assert.deepEqual(seen, ['start']);
following = true;
events.stepMoveDetection(400 + MOVE_END_WAIT_MS);
assert.deepEqual(seen, ['start'], 'never while following');
following = false;
events.stepMoveDetection(401 + MOVE_END_WAIT_MS);
assert.deepEqual(seen, ['start', 'end']);
});