Freeze map animation while paused
Packet dots, waves and clouds run on a clock that only advances while the game is playing. Closes #11
This commit is contained in:
parent
23b72dcb92
commit
cc6d328511
3 changed files with 17 additions and 2 deletions
|
|
@ -179,3 +179,15 @@ test('#7 NOC legend, sortable network table and transit destinations', () => {
|
|||
assert.match(ev("document.getElementById('panelBody').textContent"), /Top destinations on this port/);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
test('#11 pausing freezes the dots on the links', () => {
|
||||
const { ev, errors } = load();
|
||||
base(ev);
|
||||
ev("ACT.animSet({v:'on'});UI.speed=1;last=1000;frame(1016)");
|
||||
const t0 = ev("animT");
|
||||
ev("UI.speed=0;frame(1100);frame(1400)");
|
||||
assert.equal(ev("animT"), t0, 'clock stands still while paused');
|
||||
ev("UI.speed=1;frame(1416)");
|
||||
assert.ok(ev("animT") > t0, 'and moves again on play');
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue