mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-21 02:32:18 +00:00
fix(selection): selecting or tracking a contact never recolours it
A tracked aircraft's icon and 3D model keep the colours they have untracked in Flights and Military Flights (no cyan, no lighter amber); only the icon's alpha changes (stale fade, clear while its model draws). A selected vessel or aid keeps its type colour instead of white, and a tracked satellite's dot keeps its class colour instead of yellow. An emergency stays red while tracked.
This commit is contained in:
1 parent
2f0c01eaa7
commit
f49352d228
23 files changed
+192
-108
No files matched your search
@@ -600,6 +600,29 @@ test('an aid to navigation is drawn as the upright buoy, a vessel as its kind’
|
||||
assert.deepEqual(sail.size, buoy.size);
|
||||
});
|
||||
|
||||
test('selecting a vessel or an aid never changes its colour', async () => {
|
||||
const aid = {
|
||||
...observation('993672002'),
|
||||
mmsi: '993672002',
|
||||
type: 'Port Hand Mark',
|
||||
speedMps: 0,
|
||||
};
|
||||
const ship = { ...observation('366999004'), type: 'Cargo' };
|
||||
const { layer, icons } = setup({
|
||||
async getSnapshot() {
|
||||
return snapshot([aid, ship]);
|
||||
},
|
||||
});
|
||||
await layer.update();
|
||||
for (const [id, css] of [
|
||||
['366999004', VESSEL_KIND_STYLES.cargo.css],
|
||||
['993672002', AID_TO_NAVIGATION_STYLE.css],
|
||||
]) {
|
||||
assert.equal(layer.selectById(id), true);
|
||||
assert.deepEqual(icons.item(id).color, cssColor(css), id);
|
||||
}
|
||||
});
|
||||
|
||||
test('a virtual aid to navigation keeps its buoy and its virtual flag', async () => {
|
||||
const aid = {
|
||||
...observation('993672009'),
|
||||
|
||||
Reference in new issue
Block a user