mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
The timeline marks launches and strong earthquakes, not every weather frame
The timeline drew a tick for every registered mark, and the weather clock registered every radar, satellite and lightning frame, which come every few minutes, so the track was a wall of dashes and the arrow keys crept from frame to frame. Weather products now register only the span of their frames (start and end, as before) with no marks. Holds, the gate and the next-frame wait while the world plays are unchanged. A weather row's step param goes to the previous or next weather frame (every shown product's frames, and the row's own while it is suspended) rather than to the timeline's marks. The Earthquakes layer registers with the world clock once, at init, and unregisters on destroy. While on, its quakes of magnitude 6 and up (EARTHQUAKE_MARK_MAGNITUDE) are marks, and its coverage is their own span, or none without any, so it never stretches the timeline beyond the feed. Off, it has none. It tells the clock when the set of marks changes. The map still draws every M2.5+ quake. Launches stay marks. With no mark ahead or behind, the arrow keys step along the track as shown.
This commit is contained in:
1 parent
326cab4cf2
commit
7cb854c923
11 files changed
+181
-41
No files matched your search
@@ -592,8 +592,12 @@ test('without a clock the layer keeps one of its own on the world clock and lets
|
||||
h.stages[0].finish();
|
||||
await update;
|
||||
assert.equal(worldClock.follows('weather-radar'), true);
|
||||
for (const time of times)
|
||||
assert.ok(worldClock.coverage().marks.includes(Date.parse(time)));
|
||||
// The frames span the timeline's time; they are not marks on it.
|
||||
assert.deepEqual(worldClock.coverage(), {
|
||||
start: Date.parse(times[0]),
|
||||
end: Date.parse(times.at(-1)),
|
||||
marks: [],
|
||||
});
|
||||
h.layer.setParams({ play: true });
|
||||
assert.equal(worldClock.isPlaying(), true);
|
||||
assert.equal(worldClock.getState().stepping, false);
|
||||
@@ -616,7 +620,7 @@ test('without a clock the layer keeps one of its own on the world clock and lets
|
||||
assert.ok(h.clears() >= 1);
|
||||
});
|
||||
|
||||
test('reduced motion offers no play; steps still move the world clock from mark to mark', async () => {
|
||||
test('reduced motion offers no play; steps still move the world clock from frame to frame', async () => {
|
||||
const h = layerHarness({ reducedMotion: true });
|
||||
const update = h.layer.update();
|
||||
await flush();
|
||||
@@ -626,8 +630,8 @@ test('reduced motion offers no play; steps still move the world clock from mark
|
||||
h.layer.getRowControls().chips.some((chip) => chip.id === 'play'),
|
||||
false,
|
||||
);
|
||||
// As the timeline's arrow keys do, a step back from live goes to the
|
||||
// newest frame, and the next one back to the frame before it.
|
||||
// A step back from live goes to the newest frame, and the next one back
|
||||
// to the frame before it.
|
||||
h.layer.setParams({ step: -1 });
|
||||
await flush();
|
||||
assert.equal(worldClock.now(), Date.parse(times[2]));
|
||||
@@ -656,7 +660,7 @@ test('a row steps forward and plays from a past time through the world clock', a
|
||||
assert.equal(
|
||||
worldClock.now(),
|
||||
Date.parse(times[2]),
|
||||
'no mark after the newest frame',
|
||||
'no frame after the newest',
|
||||
);
|
||||
worldClock.seek(Date.parse(times[1]));
|
||||
await flush();
|
||||
@@ -1829,8 +1833,8 @@ test('a row steps the world clock through every registered observation; missing
|
||||
.chips.filter(({ id }) =>
|
||||
['previous', 'play', 'next', 'latest'].includes(id),
|
||||
);
|
||||
// As the timeline's arrow keys do, a step back from live goes to the
|
||||
// newest frame, and the next one back to the frame before it.
|
||||
// A step back from live goes to the newest frame, and the next one back
|
||||
// to the frame before it.
|
||||
radar.layer.setParams({ step: -1 });
|
||||
await flush();
|
||||
assert.equal(clock.getState().target, times[2]);
|
||||
|
||||
Reference in new issue
Block a user