From 85160233a8096e7fa4a8df18ed939412ab920441 Mon Sep 17 00:00:00 2001 From: Alexander Onnikov Date: Thu, 20 Feb 2025 23:15:15 +0700 Subject: [PATCH] fix max width for left tooltip position (#8064) Signed-off-by: Alexander Onnikov --- packages/ui/src/components/TooltipInstance.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/components/TooltipInstance.svelte b/packages/ui/src/components/TooltipInstance.svelte index f48dadb460..8306480b2a 100644 --- a/packages/ui/src/components/TooltipInstance.svelte +++ b/packages/ui/src/components/TooltipInstance.svelte @@ -158,7 +158,7 @@ options.maxWidth = `calc(${maxWidth}px - 1.5rem)` options.transform = 'translateY(-50%)' } else if (dir === 'left') { - const maxWidth = Math.min(docWidth / 2, docWidth - rectAnchor.x) + const maxWidth = Math.min(docWidth / 2, rectAnchor.x) options.top = rectAnchor.y + rectAnchor.height / 2 + 'px' options.right = `calc(${docWidth - rectAnchor.x}px + .75rem)` options.maxWidth = `calc(${maxWidth}px - 1.5rem)`