Skip to content

Commit b4be06c

Browse files
ryan-williamsclaude
andcommitted
Add data-loaded attribute for scrns wait, fix og-ward screenshot
Add `data-loaded` DOM attribute to root div when data fetch completes, and use `[data-loaded]` as the scrns selector. This makes `waitForSelector` block until GeoJSON is loaded, fixing the og-ward screenshot where ward geometry appeared unloaded with a fixed sleep timer. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 72edf5a commit b4be06c

4 files changed

Lines changed: 2 additions & 2 deletions

File tree

www/public/cast.gif

935 Bytes
Loading

www/public/og-ward.png

116 KB
Loading

www/scrns.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const wardView = '?v=40.7310-74.0471+11.8+57-2'
55
export default {
66
host: 3201,
77
output: 'public',
8-
selector: '#root',
8+
selector: '[data-loaded]',
99
screenshots: {
1010
'og-lot': {
1111
query: `${defaultView}&agg=lot&sel=14507-1`,

www/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ export default function App() {
650650
}
651651

652652
return (
653-
<div style={{ width: '100vw', height: '100vh', WebkitTouchCallout: 'none' }} onContextMenu={e => e.preventDefault()}>
653+
<div style={{ width: '100vw', height: '100vh', WebkitTouchCallout: 'none' }} onContextMenu={e => e.preventDefault()} {...(!loading && { 'data-loaded': '' })}>
654654
<DeckGL
655655
viewState={viewState}
656656
onViewStateChange={({ viewState: vs }) => {

0 commit comments

Comments
 (0)