diff --git a/products/jbrowse-react-linear-genome-view/stories/JBrowseLinearGenomeView.stories.tsx b/products/jbrowse-react-linear-genome-view/stories/JBrowseLinearGenomeView.stories.tsx index 53b42a7e24..98677e0a9b 100644 --- a/products/jbrowse-react-linear-genome-view/stories/JBrowseLinearGenomeView.stories.tsx +++ b/products/jbrowse-react-linear-genome-view/stories/JBrowseLinearGenomeView.stories.tsx @@ -375,17 +375,18 @@ export const NextstrainExample = () => { return } +function loc(r: Region) { + return `${r.refName}:${Math.floor(r.start)}-${Math.floor(r.end)}` +} const VisibleRegions = observer( ({ state }: { state: ReturnType }) => { - const locstrings = state.session.views[0].coarseDynamicBlocks - .map( - (region: Region) => - `${region.refName}:${Math.floor(region.start)}-${Math.floor( - region.end, - )}`, - ) - .join(',') - return

Visible region: {locstrings}

+ const view = state.session.views[0] + return view.initialized ? ( +
+

Visible region {view.coarseDynamicBlocks.map(loc).join(',')}

+

Static blocks {view.staticBlocks.map(loc).join(',')}

+
+ ) : null }, )