\r\n\r\n {/* Calculated information */}\r\n {calculated && (
\r\n \r\n {`${t('measure.estimated-error')}: `}\r\n {errorElement}\r\n
\r\n\r\n \r\n {`${t('measure.camera-distance-1')}: `}\r\n {distanceElement1}\r\n
\r\n\r\n \r\n {`${t('measure.camera-distance-2')}: `}\r\n {distanceElement2}\r\n
\r\n )}\r\n\r\n {/* Observation status */}\r\n {!calculated && (
\r\n\r\n \r\n {`${t('measure.observation-1')}: `}\r\n {observationText1}\r\n
\r\n\r\n \r\n {`${t('measure.observation-2')}: `}\r\n {observationText2}\r\n
\r\n )}\r\n\r\n {/* Status message */}\r\n {!valid && (
\r\n {`${t('measure.status')}: `}\r\n {message}\r\n
)}\r\n\r\n\r\n
\r\n );\r\n};\r\n\r\nexport const MultiImageWindow = (props) => {\r\n const viewer = props.viewer as Viewer;\r\n const state = props.multiImageState as MultiImageOptions;\r\n const {multiImageOpen, setMultiImageOpen} = props;\r\n\r\n const classes = useStyles();\r\n const {t} = useTranslation();\r\n\r\n const [customPromptOpen, setCustomPromptOpen] = useState(false);\r\n const [customPromptState, setCustomPromptState] = useState({\r\n title: null,\r\n text: null,\r\n callback: () => {}\r\n });\r\n\r\n const onClose = () => {\r\n const result = viewer.multiImageClosePrompt();\r\n\r\n if (result) {\r\n setCustomPromptState({...result});\r\n setCustomPromptOpen(true);\r\n } else {\r\n setMultiImageOpen(false);\r\n }\r\n };\r\n\r\n const onRefModified = (container) => {\r\n if (!container) return;\r\n viewer.initMultiImageContainer(container);\r\n };\r\n\r\n const onNextImage = () => {\r\n viewer.multiImageNextImage();\r\n };\r\n\r\n const onPreviousImage = () => {\r\n viewer.multiImagePreviousImage();\r\n };\r\n\r\n const onComplete = () => {\r\n viewer.multiImageOnComplete();\r\n };\r\n\r\n const onAddPoint = () => {\r\n viewer.multiImageOnAddMore();\r\n };\r\n\r\n useEffect(() => {\r\n viewer?.toggleMultiImageWindow(multiImageOpen);\r\n }, [multiImageOpen]);\r\n\r\n const {canAddMore, canComplete, disableAddMore, disableComplete,\r\n disablePreviousImage, disableNextImage} = state;\r\n\r\n const textLines = [\r\n t('measure.click-to-add-observation-2')\r\n ];\r\n\r\n return (\r\n