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)`