fix(mobile): on a narrow 3D map the flyover controls and grade legend stand as a column of icons on the side, the layer pill keeps the bottom row; and the lint ratchets the last push tipped

This commit is contained in:
Maurice
2026-11-08 12:30:12 +01:00
parent ed6724035e
commit 305b00ae01
5 changed files with 138 additions and 37 deletions
@@ -133,7 +133,7 @@ describe('VectorBasemap', () => {
const { findByTestId, queryByTestId } = render(<VectorBasemap style={OFM_POSITRON} />)
await waitFor(() => expect(maplibreGL).toHaveBeenCalledTimes(1))
const { layer, gl } = lastLayer()
const onError = gl.on.mock.calls.find(([name]) => name === 'error')![1] as (e: { error?: unknown }) => void
const onError = gl.on.mock.calls.find(([name]) => name === 'error')?.[1] as (e: { error?: unknown }) => void
expect(gl.once).toHaveBeenCalledWith('style.load', expect.any(Function))
expect(queryByTestId('raster-basemap')).toBeNull()
@@ -146,8 +146,8 @@ describe('VectorBasemap', () => {
render(<VectorBasemap style={OFM_POSITRON} />)
await waitFor(() => expect(maplibreGL).toHaveBeenCalledTimes(2))
const second = lastLayer()
const secondError = second.gl.on.mock.calls.find(([name]) => name === 'error')![1] as (e: { error?: unknown }) => void
;(second.gl.once.mock.calls.find(([name]) => name === 'style.load')![1] as () => void)()
const secondError = second.gl.on.mock.calls.find(([name]) => name === 'error')?.[1] as (e: { error?: unknown }) => void
;(second.gl.once.mock.calls.find(([name]) => name === 'style.load')?.[1] as () => void)()
act(() => secondError({ error: new Error('one tile') }))
expect(second.layer.remove).not.toHaveBeenCalled()
warn.mockRestore()