Skip to content

Commit ee6d2aa

Browse files
committed
repo cleanup
1 parent 4b6c5ce commit ee6d2aa

File tree

2 files changed

+33
-27
lines changed

2 files changed

+33
-27
lines changed

apps/visr/src/App.tsx

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function App() {
2121

2222
return (
2323
<>
24-
<h1>testing the fastapi ws for hdf readout</h1>
24+
<h1>ViSR web interface</h1>
2525

2626
<ButtonGroup>
2727
<Button onClick={() => setBackend('colors')}> use colors backend</Button>
@@ -30,30 +30,37 @@ function App() {
3030
<Button onClick={() => setBackend('epics')}>use epics backend</Button>
3131
</ButtonGroup>
3232
{
33-
backend === 'colors' ?
34-
<>
35-
<Plot />
36-
<WebsocketChart />
37-
<ColorsChart />
38-
</>
39-
: backend === 'hdf' ? <>
40-
<Stack direction='row'>
41-
<DatasetShapeViewer />
42-
<StateViewer />
43-
</Stack>
44-
<ParsedPointsChart />
45-
</> : backend === 'generic' ? <>
46-
<p>generic backend</p>
47-
<GenericPanel />
48-
</> : backend === 'epics' ?
49-
<Box height='80vh' width='80vw' border='2px red solid'>
50-
epics backend
51-
{/* todo here a nice auto generated component */}
52-
{/* <EpicsBackend /> */}
53-
<Live3DViewer wsUrl="ws://localhost:3002/raster" />
54-
{/* <WebSocketDemo /> */}
55-
</Box>
56-
: <p>error rendering - unknown backend</p>
33+
backend === 'colors' &&
34+
<>
35+
<Plot />
36+
<WebsocketChart />
37+
<ColorsChart />
38+
</>
39+
}
40+
{
41+
backend === 'hdf' && <>
42+
<Stack direction='row'>
43+
<DatasetShapeViewer />
44+
<StateViewer />
45+
</Stack>
46+
<ParsedPointsChart />
47+
</>}{
48+
49+
50+
backend === 'generic' && <>
51+
<p>generic backend</p>
52+
<GenericPanel />
53+
</>
54+
55+
}
56+
{backend === 'epics' &&
57+
<Box height='80vh' width='80vw' border='2px red solid'>
58+
epics backend
59+
{/* todo here a nice auto generated component */}
60+
{/* <EpicsBackend /> */}
61+
<Live3DViewer wsUrl="ws://localhost:3002/raster" />
62+
{/* <WebSocketDemo /> */}
63+
</Box>
5764
}
5865
</>
5966
);

apps/visr/src/components/Visualization.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ type ThreeDVisualizationProps = {
5151

5252
export default function ThreeDVisualization({ state }: ThreeDVisualizationProps) {
5353
return (
54-
<div style={{ border: '2px solid blue', height: '200px' }}>
55-
<h3> below the canvas</h3>
54+
<div style={{ border: '2px solid blue', height: '40vh' }}>
5655

5756
<Canvas camera={{ position: [150, 150, 15], fov: 20 }}>
5857
<Scene state={state} />

0 commit comments

Comments
 (0)