Update viewers on window resize (#52)

* Update three on window resize
Fixes #43

* Clean up
This commit is contained in:
Pierre Jacquier
2023-03-30 04:31:58 -04:00
committed by GitHub
parent 8e311fb04d
commit e8d4798c17

View File

@ -37,12 +37,13 @@ export function CadDiff({ before, after }: FileDiff): React.ReactElement {
dashEdge: theme?.colors.success.subtle,
}
return (
<Box display="flex" height={300}>
<Box flexGrow={1} backgroundColor="danger.subtle">
<Box display="flex" height={300} overflow="hidden" minWidth={0}>
<Box flexGrow={1} minWidth={0} backgroundColor="danger.subtle">
{before && <ViewerSTL file={before} colors={beforeColors} />}
</Box>
<Box
flexGrow={1}
minWidth={0}
backgroundColor="success.subtle"
borderLeftWidth={1}
borderLeftColor="border.default"