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:
Maurice
2026-11-13 17:02:39 +01:00
parent e525e0b838
commit 7238f8ae25
3 changed files with 9 additions and 51 deletions
+1 -1
View File
@@ -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]);