From 2072ac2072011ad9a62cf229066af8b3f470aac0 Mon Sep 17 00:00:00 2001 From: goodmice Date: Tue, 25 Oct 2022 18:59:44 +0500 Subject: [PATCH] =?UTF-8?q?=D0=AD=D0=BA=D1=81=D0=BF=D0=BE=D1=80=D1=82?= =?UTF-8?q?=D1=8B=20TVD=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BD=D0=B5=D1=81=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B0=20=D0=BE?= =?UTF-8?q?=D1=82=20=D0=BA=D1=80=D0=BE=D1=88=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Well/WellOperations/Tvd/index.jsx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/pages/Well/WellOperations/Tvd/index.jsx b/src/pages/Well/WellOperations/Tvd/index.jsx index f295d49..e41ba75 100644 --- a/src/pages/Well/WellOperations/Tvd/index.jsx +++ b/src/pages/Well/WellOperations/Tvd/index.jsx @@ -4,7 +4,7 @@ import { Switch, Segmented } from 'antd' import { Link } from 'react-router-dom' import * as d3 from 'd3' -import { useWell } from '@asb/context' +import { useTopRightBlock, useWell } from '@asb/context' import { D3Chart } from '@components/d3' import LoaderPortal from '@components/LoaderPortal' import { invokeWebApiWrapperAsync } from '@components/factory' @@ -170,6 +170,8 @@ const Tvd = memo(({ well: givenWell, title, ...other }) => { const [pointsEnabled, setPointsEnabled] = useState(true) const [selectedTab, setSelectedTab] = useState('Скрыть') + const setTopRightBlock = useTopRightBlock() + const [wellContext] = useWell() const well = useMemo(() => givenWell ?? wellContext, [givenWell, wellContext]) @@ -227,11 +229,22 @@ const Tvd = memo(({ well: givenWell, title, ...other }) => { ) }, [well]) + useEffect(() => { + setTopRightBlock( +
+ + +
+ ) + }, [well, setTopRightBlock]) + return (

{title || 'График Глубина-день'}

+
+
{ title={'Нажмите для переключения видимости засечек на графиках'} /> -
-
- -