diff --git a/frontend/src/components/DarkMaskSettings.tsx b/frontend/src/components/DarkMaskSettings.tsx index e7c3713d..14cab3a2 100644 --- a/frontend/src/components/DarkMaskSettings.tsx +++ b/frontend/src/components/DarkMaskSettings.tsx @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import Paper from '@mui/material/Paper'; -import { Stack } from '@mui/material'; +import {Checkbox, FormControlLabel, Stack} from '@mui/material'; import _ from 'lodash'; import NumberTextField from './NumberTextField'; import ButtonWithSnackbar from './ButtonWithSnackbar'; @@ -88,6 +88,29 @@ class DarkMaskSettings extends Component { Dark data collection settings for mask
(DECTRIS detectors only)
+ { + const checked = e.target.checked; + this.setState((prev) => { + const nextFrames = checked + ? 0 + : prev.s.number_of_frames === 0 + ? 1000 + : prev.s.number_of_frames; + return { + number_of_frames_err: false, // zero-mode has no error + s: { ...prev.s, number_of_frames: nextFrames }, + }; + }); + }} + /> + } + label="Enable dark data collection" + /> + { })); }} /> - - { }} /> + +