fixed the gate page and svg

This commit is contained in:
csawatzky 2025-05-14 12:36:31 -06:00
parent 25a13c1809
commit 3fd614479f
3 changed files with 11 additions and 4 deletions

View file

@ -31,6 +31,8 @@ interface Props {
drawerView?: boolean; drawerView?: boolean;
} }
export default function GateDevice(props: Props) { export default function GateDevice(props: Props) {
const { gate, comprehensiveDevice, linkedCompList, drawerView } = props; const { gate, comprehensiveDevice, linkedCompList, drawerView } = props;
const [{as}] = useGlobalState(); const [{as}] = useGlobalState();
@ -234,6 +236,7 @@ export default function GateDevice(props: Props) {
return ( return (
<Select <Select
id="ambientSelect" id="ambientSelect"
variant="standard"
value={ambientKey} value={ambientKey}
style={{ fontSize: 8 }} style={{ fontSize: 8 }}
onChange={e => { onChange={e => {
@ -266,6 +269,7 @@ export default function GateDevice(props: Props) {
return ( return (
<Select <Select
id="tempSelect" id="tempSelect"
variant="standard"
value={tempKey} value={tempKey}
style={{ fontSize: 8 }} style={{ fontSize: 8 }}
onChange={e => { onChange={e => {
@ -300,6 +304,7 @@ export default function GateDevice(props: Props) {
return ( return (
<Select <Select
id="pressureSelect" id="pressureSelect"
variant="standard"
value={pressureKey} value={pressureKey}
style={{ fontSize: 8 }} style={{ fontSize: 8 }}
onChange={e => { onChange={e => {
@ -335,9 +340,10 @@ export default function GateDevice(props: Props) {
container container
direction="row" direction="row"
alignContent="center" alignContent="center"
width="100%"
//alignItems="center" //alignItems="center"
> >
<Grid size={{ sm: 12, lg: isMobile || drawerView ? 12 : 8}} style={{ padding: 10 }}> <Grid size={{ sm: 12, lg: isMobile || drawerView ? 12 : 4}} style={{ padding: 10 }}>
<Box <Box
paddingLeft={1} paddingLeft={1}
display="flex" display="flex"

View file

@ -355,13 +355,13 @@ export default function GateSVG(props: Props) {
{renderValues()} {renderValues()}
</g> </g>
<foreignObject height={20} width={120} x={10} y={83}> <foreignObject height={20} width={120} x={10} y={83}>
<Box style={{ position: "fixed" }}>{ambientSelector()}</Box> <Box sx={{ position: "fixed" }}>{ambientSelector()}</Box>
</foreignObject> </foreignObject>
<foreignObject height={20} width={120} x={10} y={118}> <foreignObject height={20} width={120} x={10} y={118}>
<Box style={{ position: "fixed" }}>{tempChainSelector()}</Box> <Box sx={{ position: "fixed" }}>{tempChainSelector()}</Box>
</foreignObject> </foreignObject>
<foreignObject height={20} width={120} x={10} y={153}> <foreignObject height={20} width={120} x={10} y={153}>
<Box style={{ position: "fixed" }}>{pressureChainSelector()}</Box> <Box sx={{ position: "fixed" }}>{pressureChainSelector()}</Box>
</foreignObject> </foreignObject>
{pcaRed()} {pcaRed()}
{pcaGreen()} {pcaGreen()}

View file

@ -339,6 +339,7 @@ export default function Gate(props: Props) {
}} }}
style={{ height: 150, width: "100%", margin: -15 }}> style={{ height: 150, width: "100%", margin: -15 }}>
<Grid <Grid
width="100%"
container container
direction="row" direction="row"
spacing={2} spacing={2}