Fixed tooltips out of viewport (Y axis)
This commit is contained in:
parent
e8a9ae20c1
commit
d8ae8dec82
@ -39,6 +39,7 @@ export default class ToolTip extends HTMLElement {
|
||||
}
|
||||
|
||||
let offsetX = 0
|
||||
let offsetY = 0
|
||||
|
||||
if(finalX < contentRect.left) {
|
||||
offsetX = contentRect.left - finalX
|
||||
@ -48,6 +49,11 @@ export default class ToolTip extends HTMLElement {
|
||||
finalX += offsetX
|
||||
}
|
||||
|
||||
if(finalY < contentRect.top) {
|
||||
offsetY = contentRect.top - finalY
|
||||
finalY += offsetY
|
||||
}
|
||||
|
||||
let arrowX = boxRect.width / 2 - offsetX
|
||||
|
||||
Diff.mutations.queue(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user