Skip to content

Commit 98bd5cb

Browse files
committed
Context example
1 parent 18b0f9b commit 98bd5cb

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/screens/OavMover/OavControlHelper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export function PixelsToMicrons({
6363
label="Pixels per micron"
6464
onChange={(e) =>
6565
setPixelsPerMicron(
66-
Number(e.target.value) ? Number(e.target.value) : 0
66+
Number(e.target.value) ? Number(e.target.value) : 0,
6767
)
6868
}
6969
defaultValue={1.25}

src/screens/OavMover/OavMover.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface CrosshairContextType {
1717
}
1818

1919
export const crosshairContext = createContext<CrosshairContextType | null>(
20-
null
20+
null,
2121
);
2222

2323
export function OavMover() {
@@ -42,12 +42,12 @@ export function OavMover() {
4242
onCoordClick={(x: number, y: number) => {
4343
const [x_um, y_um] = [x / pixelsPerMicron, y / pixelsPerMicron];
4444
console.log(
45-
`Clicked on position (${x}, ${y}) (px relative to beam centre) in original stream. Relative position in um (${x_um}, ${y_um}). Submitting to BlueAPI...`
45+
`Clicked on position (${x}, ${y}) (px relative to beam centre) in original stream. Relative position in um (${x_um}, ${y_um}). Submitting to BlueAPI...`,
4646
);
4747
const [x_int, y_int] = [Math.round(x), Math.round(y)];
4848
if (Number.isNaN(x_um) || Number.isNaN(y_um)) {
4949
console.log(
50-
"Not submitting plan while disconnected from PVs!"
50+
"Not submitting plan while disconnected from PVs!",
5151
);
5252
} else {
5353
// This is an example but not useful for actual production use.
@@ -57,7 +57,7 @@ export function OavMover() {
5757
instrumentSession: parseInstrumentSession(fullVisit),
5858
}).catch((error) => {
5959
console.log(
60-
`Failed to run plan gui_gonio_move_on_click, see console and logs for full error. Reason: ${error}`
60+
`Failed to run plan gui_gonio_move_on_click, see console and logs for full error. Reason: ${error}`,
6161
);
6262
});
6363
}

0 commit comments

Comments
 (0)