fix max width for left tooltip position (#8064)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2025-02-20 23:15:15 +07:00 committed by GitHub
parent e5fbe6cbd5
commit 85160233a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

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