mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-03 09:38:54 +00:00
fix(flight-live): reuse the basemap's label hiding and keep the GL guard optional
The resize guard reached for the bridge's MaplibreGL class, which the test mocks of the bridge do not provide, so every mocked basemap counted as an unloaded chunk. The guard now only applies where the class exists. The mini map hides place names through VectorBasemap's own hideLabelLayers (a hideLabels prop) instead of a second copy of that logic, and the route test no longer uses Array.prototype.at, which the client's lib target lacks.
This commit is contained in:
@@ -34,7 +34,7 @@ describe('flightRoute', () => {
|
||||
it('FE-UTIL-FLIGHTROUTE-004: cuts the route where the aircraft is, clamped to its ends', () => {
|
||||
const route = greatCircle(FRA, YYZ, 10);
|
||||
const half = splitRoute(route, 0.5);
|
||||
expect(half.flown.at(-1)).toEqual(half.at);
|
||||
expect(half.flown[half.flown.length - 1]).toEqual(half.at);
|
||||
expect(half.ahead[0]).toEqual(half.at);
|
||||
expect(half.flown.length + half.ahead.length).toBe(route.length + 2);
|
||||
expect(splitRoute(route, -1).at).toEqual(route[0]);
|
||||
|
||||
Reference in New Issue
Block a user