mirror of
https://github.com/mbirth/tcl_update_db.git
synced 2024-12-26 12:34:07 +00:00
Fix tooltip position when text too wide.
This commit is contained in:
parent
4c247369d0
commit
3707089942
@ -114,7 +114,10 @@ document.addEventListener 'DOMContentLoaded', (event) ->
|
|||||||
|
|
||||||
if mouseX + cursorOffset + tooltipWidth >= viewportRight
|
if mouseX + cursorOffset + tooltipWidth >= viewportRight
|
||||||
# show tooltip LEFT of cursor
|
# show tooltip LEFT of cursor
|
||||||
tooltip.style.left = (mouseX - cursorOffset - tooltipWidth) + 'px'
|
leftPos = mouseX - cursorOffset - tooltipWidth
|
||||||
|
if leftPos < 0
|
||||||
|
leftPos = 0
|
||||||
|
tooltip.style.left = leftPos + 'px'
|
||||||
else
|
else
|
||||||
# show tooltip right of cursor
|
# show tooltip right of cursor
|
||||||
tooltip.style.left = (mouseX + cursorOffset) + 'px'
|
tooltip.style.left = (mouseX + cursorOffset) + 'px'
|
||||||
|
Loading…
Reference in New Issue
Block a user