From cce35f32ef88f284d4111282bc6b98538c0d93af Mon Sep 17 00:00:00 2001 From: goodmice Date: Thu, 30 Jun 2022 08:54:05 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=BE=20=D0=B4=D1=80=D0=B5=D0=B1=D0=B5=D0=B7=D0=B6?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=82=D1=83=D0=BB=D1=82=D0=B8=D0=BF?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B0=20=D0=BA=D1=80=D0=B0=D1=8E=20=D0=B7=D0=BE?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=BE=D1=82=D1=81=D0=BB=D0=B5=D0=B6=D0=B8=D0=B2?= =?UTF-8?q?=D0=B0=D0=BD=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/d3/plugins/D3Tooltip.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/components/d3/plugins/D3Tooltip.tsx b/src/components/d3/plugins/D3Tooltip.tsx index 6539d0e..6b6bc7a 100644 --- a/src/components/d3/plugins/D3Tooltip.tsx +++ b/src/components/d3/plugins/D3Tooltip.tsx @@ -174,14 +174,7 @@ function _D3Tooltip>({ if (!tooltipRef.current || !zoneRect || fixed) return const rect = tooltipRef.current.getBoundingClientRect() - if (!mouseState.visible) { - setStyle((prev) => ({ - ...prev, - left: -rect.width, - top: -rect.height, - })) - return - } + if (!mouseState.visible) return const offsetX = -rect.width / 2 // По центру const offsetY = 15 // Чуть выше курсора