Skip to content

Commit a5318a8

Browse files
committed
revert auto-formatting
Signed-off-by: PARTHIV PRATIM SAIKIA <parthivsaikia985@gmail.com>
1 parent 50541c4 commit a5318a8

File tree

2 files changed

+21
-57
lines changed

2 files changed

+21
-57
lines changed

site/src/components/ShapeBuilder/index.js

Lines changed: 20 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
// /* global window */
22
import React, { useEffect, useRef, useState } from "react";
3-
import {
4-
Wrapper,
5-
CanvasContainer,
6-
OutputBox,
7-
StyledSVG,
8-
CopyButton,
9-
} from "./shapeBuilder.styles";
3+
import { Wrapper, CanvasContainer, OutputBox, StyledSVG, CopyButton } from "./shapeBuilder.styles";
104
import { Button, Typography, Box, CopyIcon } from "@sistent/sistent";
115
import { SVG, extend as SVGextend } from "@svgdotjs/svg.js";
126
import draw from "@svgdotjs/svg.draw.js";
@@ -66,16 +60,13 @@ const ShapeBuilder = () => {
6660

6761
const points = getPlottedPoints(poly);
6862
if (!points) return;
69-
const xs = points.map((p) => p[0]);
70-
const ys = points.map((p) => p[1]);
63+
const xs = points.map(p => p[0]);
64+
const ys = points.map(p => p[1]);
7165

7266
const width = Math.abs(Math.max(...xs) - Math.min(...xs));
7367
const height = Math.abs(Math.max(...ys) - Math.min(...ys));
7468

75-
poly.size(
76-
width > height ? 520 : undefined,
77-
height >= width ? 520 : undefined,
78-
);
69+
poly.size(width > height ? 520 : undefined, height >= width ? 520 : undefined);
7970
poly.move(0, 0);
8071
showCytoArray();
8172
};
@@ -188,59 +179,32 @@ const ShapeBuilder = () => {
188179
onDoubleClick={closeShape}
189180
>
190181
<defs>
191-
<pattern
192-
id="grid"
193-
width="16"
194-
height="16"
195-
patternUnits="userSpaceOnUse"
196-
>
197-
<path
198-
d="M 16 0 L 0 0 0 16"
199-
fill="none"
200-
stroke="#797d7a"
201-
strokeWidth="1"
202-
/>
182+
<pattern id="grid" width="16" height="16" patternUnits="userSpaceOnUse">
183+
<path d="M 16 0 L 0 0 0 16" fill="none" stroke="#797d7a" strokeWidth="1" />
203184
</pattern>
204185
</defs>
205186
<rect className="grid" width="100%" height="100%" fill="url(#grid)" />
206187
</StyledSVG>
207188
{error && (
208-
<div
209-
style={{
210-
position: "absolute",
211-
top: "50%",
212-
left: "50%",
213-
transform: "translate(-50%, -50%)",
214-
color: "red",
215-
backgroundColor: "white",
216-
padding: "10px",
217-
borderRadius: "5px",
218-
}}
219-
>
189+
<div style={{
190+
position: "absolute",
191+
top: "50%",
192+
left: "50%",
193+
transform: "translate(-50%, -50%)",
194+
color: "red",
195+
backgroundColor: "white",
196+
padding: "10px",
197+
borderRadius: "5px"
198+
}}>
220199
{error}
221200
</div>
222201
)}
223202
</CanvasContainer>
224203

225-
<Box
226-
sx={{
227-
display: "flex",
228-
justifyContent: "center",
229-
gap: 2,
230-
mt: 3,
231-
mb: 3,
232-
flexWrap: "wrap",
233-
}}
234-
>
235-
<Button variant="contained" onClick={clearShape}>
236-
Clear
237-
</Button>
238-
<Button variant="contained" onClick={closeShape}>
239-
Close Shape
240-
</Button>
241-
<Button variant="contained" onClick={handleMaximize}>
242-
Maximize
243-
</Button>
204+
<Box sx={{ display: "flex", justifyContent: "center", gap: 2, mt: 3, mb: 3, flexWrap: "wrap" }}>
205+
<Button variant="contained" onClick={clearShape}>Clear</Button>
206+
<Button variant="contained" onClick={closeShape}>Close Shape</Button>
207+
<Button variant="contained" onClick={handleMaximize}>Maximize</Button>
244208
</Box>
245209

246210
<OutputBox>

site/src/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { SistentThemeProviderWithoutBaseLine, Box } from "@sistent/sistent";
99

1010
const Kbd = styled.kbd`
1111
background-color: ${({ theme }) =>
12-
theme.mode === "light" ? "#f4f4f4" : "#2b2b2b"};
12+
theme.mode === "light" ? "#f4f4f4" : "#2b2b2b"};
1313
border: 1px solid
1414
${({ theme }) => (theme.mode === "light" ? "#d1d5da" : "#444")};
1515
border-bottom-color: ${({ theme }) =>

0 commit comments

Comments
 (0)