mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Stories: phone entry, centred framing, review follow-ups
- On GEV's phone layout, where neither the style readout nor the account avatar shows, the Stories button goes icon-only under the corner-actions column instead of covering the top row of icon buttons. - Explore frames its start view and a picked story in the middle of the map it leaves visible (beside the feed, above the phone sheet), with one short correction if that area moved during the flight. - The share icon stays visible in icon-only header buttons. - A world clock nothing moved while Stories was open (no jump, same mode and rate) is left alone on Close. - Card images use the globe's own Esri tile URL; the credit list keeps the application's full-screen placement on phones. - Tests cover the live and playing clock restores, the clock coming back after the share state, the tile-settling hold being released (settled, 10 s, Close), the visible-map aim, and the near-end Play fix in the director's real order. One changelog fragment covers the PR.
This commit is contained in:
1 parent
8a0953c35d
commit
472cc35c47
13 files changed
+351
-38
No files matched your search
@@ -18,7 +18,12 @@ function deferredDirector({ running = false } = {}) {
|
||||
running,
|
||||
calls,
|
||||
listShots: () => [{ id: 'a' }, { id: 'b' }],
|
||||
subscribeSceneClock: () => () => {},
|
||||
// The scene clock's listener, so a test can publish as the director
|
||||
// does after a seek or at a run's end.
|
||||
subscribeSceneClock: (fn) => {
|
||||
director.publish = (snap) => fn({ sceneId: 'scene-1', ...snap });
|
||||
return () => {};
|
||||
},
|
||||
stopScene: () => calls.push('stop'),
|
||||
whenIdle() {
|
||||
return new Promise((resolve) => {
|
||||
@@ -114,7 +119,11 @@ test('Play from a paused link in the final quarter-second stays in the final sho
|
||||
player.seek(59800); // 200 ms before the end of a two-shot scene
|
||||
const playing = player.play();
|
||||
await turns();
|
||||
assert.equal(player.state.wallMs, 59800, 'the link is not treated as complete');
|
||||
assert.equal(
|
||||
player.state.wallMs,
|
||||
59800,
|
||||
'the link is not treated as complete',
|
||||
);
|
||||
assert.equal(director.startAfterShotId, 'a', 'resume in the final shot');
|
||||
director.finishRun();
|
||||
await playing;
|
||||
@@ -141,3 +150,42 @@ test('Destroy cancels a waiting Play', async () => {
|
||||
await playing;
|
||||
assert.equal(director.calls.includes('start'), false);
|
||||
});
|
||||
|
||||
test('in the director’s order, a paused link near the end resumes in its final shot', async () => {
|
||||
const director = deferredDirector();
|
||||
const player = createGevPlayer(director, story);
|
||||
player.seek(59800);
|
||||
// The director reports a seek as seeking, even once it has settled.
|
||||
director.publish({
|
||||
sceneDurationSec: 60,
|
||||
sceneElapsedSec: 59.8,
|
||||
shotIndex: 1,
|
||||
running: false,
|
||||
seeking: true,
|
||||
});
|
||||
assert.equal(player.state.wallMs, 59800, 'not rounded to the end');
|
||||
const playing = player.play();
|
||||
await turns();
|
||||
assert.equal(director.startAfterShotId, 'a', 'resume in the final shot');
|
||||
director.finishRun();
|
||||
await playing;
|
||||
});
|
||||
|
||||
test('a run that ends on its own is rounded to the end, and Play then starts over', async () => {
|
||||
const director = deferredDirector();
|
||||
const player = createGevPlayer(director, story);
|
||||
// The director reports a run's natural end as stopped, not seeking.
|
||||
director.publish({
|
||||
sceneDurationSec: 60,
|
||||
sceneElapsedSec: 59.9,
|
||||
shotIndex: 1,
|
||||
running: false,
|
||||
});
|
||||
assert.equal(player.state.wallMs, 60000, 'rounded to the end');
|
||||
const playing = player.play();
|
||||
await turns();
|
||||
assert.equal(player.state.wallMs, 0);
|
||||
assert.equal(director.startAfterShotId, null, 'from the first shot');
|
||||
director.finishRun();
|
||||
await playing;
|
||||
});
|
||||
Reference in new issue
Block a user