mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
fix(satellites): class choices survive a reload and travel in share links
Only catalog and the tracked satellite were saved for the layer, so a class
chip lasted until the next reload and no share link carried it. The choice
is now the satellites option `classes`: one letter per class shown
(`sitpd` by default, `0` for none), with Starlink left to `catalog`, and
the layer takes the letters back through setParams. A partial request
(`{debris: false}`) hides only what it names.
This commit is contained in:
1 parent
8ae56587c3
commit
c84cfcadeb
9 files changed
+148
-12
No files matched your search
@@ -469,6 +469,18 @@ test('every class but Starlink shows by default; each class chip turns its class
|
||||
satellitesLayer.setParams(chip('imaging').params);
|
||||
assert.deepEqual(shown(), [25544, 40001], 'telecom back on, imaging off');
|
||||
assert.equal(satellitesLayer.setParams({ classes: 'all' }), false, 'malformed request refused');
|
||||
|
||||
// A saved or shared choice comes back as class letters.
|
||||
assert.equal(satellitesLayer.setParams({ classes: 'sip' }), true);
|
||||
assert.deepEqual(satellitesLayer.getParams().classes, {
|
||||
stations: true,
|
||||
imaging: true,
|
||||
telecom: false,
|
||||
starlink: false,
|
||||
probes: true,
|
||||
debris: false,
|
||||
});
|
||||
assert.deepEqual(shown(), [25544, 40002], 'restored from letters');
|
||||
} finally {
|
||||
console.log = log;
|
||||
console.warn = warn;
|
||||
|
||||
Reference in new issue
Block a user