diff --git a/.github/workflows/screenshot.yml b/.github/workflows/screenshot.yml index 1ddecee47..66ad85701 100644 --- a/.github/workflows/screenshot.yml +++ b/.github/workflows/screenshot.yml @@ -40,7 +40,7 @@ jobs: # Wait for the server to start timeout 30 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:5000/v1/version)" != "200" ]]; do sleep 0.5; done' || false - docker run --rm --network="host" -v $PWD:$PWD ghcr.io/linz/basemaps-screenshot/cli:v1.7.0-2-g99b800e --url http://localhost:5000 --output $PWD/.artifacts/visual-snapshots + docker run --rm --network="host" -v $PWD:$PWD ghcr.io/linz/basemaps-screenshot/cli:v1 --url http://localhost:5000 --output $PWD/.artifacts/visual-snapshots - name: Save snapshots uses: getsentry/action-visual-snapshot@v2 diff --git a/packages/landing/src/components/debug.tsx b/packages/landing/src/components/debug.tsx index fc38d07f7..b9dd7aa6f 100644 --- a/packages/landing/src/components/debug.tsx +++ b/packages/landing/src/components/debug.tsx @@ -107,18 +107,18 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> { if (Config.map.debug['debug.screenshot']) { async function addLoadedDiv(): Promise { - // Ensure hillshade source is loaded - const hillShadeSourceId = `${HillShadePrefix}${Config.map.debug['debug.hillshade']}`; - if (Config.map.debug['debug.hillshade']) { - if (map.getSource(hillShadeSourceId) == null) return; - if (!map.isSourceLoaded(hillShadeSourceId)) return; - } - // Ensure terrain source is loaded - if (Config.map.debug['debug.terrain']) { - if (map.getSource(Config.map.debug['debug.terrain']) == null) return; - if (!map.isSourceLoaded(Config.map.debug['debug.terrain'])) return; - } - // Ensure the attribution data has loaded + // // Ensure hillshade source is loaded + // const hillShadeSourceId = `${HillShadePrefix}${Config.map.debug['debug.hillshade']}`; + // if (Config.map.debug['debug.hillshade']) { + // if (map.getSource(hillShadeSourceId) == null) return; + // if (!map.isSourceLoaded(hillShadeSourceId)) return; + // } + // // Ensure terrain source is loaded + // if (Config.map.debug['debug.terrain']) { + // if (map.getSource(Config.map.debug['debug.terrain']) == null) return; + // if (!map.isSourceLoaded(Config.map.debug['debug.terrain'])) return; + // } + // // Ensure the attribution data has loaded await MapAttrState.getCurrentAttribution(); await new Promise((r) => setTimeout(r, 250)); // Jam a div into the page once the map has loaded so tools like playwright can see the map has finished loading @@ -129,12 +129,13 @@ export class Debug extends Component<{ map: maplibregl.Map }, DebugState> { document.body.appendChild(loadedDiv); } - void map.on('sourcedata', (e) => { - if (e.source.type !== 'raster-dem') return; - void addLoadedDiv(); - }); + // void map.on('sourcedata', (e) => { + // if (e.source.type !== 'raster-dem') return; + // void addLoadedDiv(); + // }); - void map.on('idle', () => { + void map.once('idle', () => { + // Ensure hillshade and terrain source is loaded this.updateFromConfig(); void addLoadedDiv(); });