fix: использовать window.pageXOffset/pageYOffset для позиционирования тултипа
Build and deploy / build-deploy (push) Has been cancelled
Build and deploy / build-deploy (push) Has been cancelled
This commit is contained in:
@@ -363,8 +363,8 @@ function showSegTip(el) {
|
|||||||
left = Math.max(8, Math.min(left, window.innerWidth - tr.width - 8));
|
left = Math.max(8, Math.min(left, window.innerWidth - tr.width - 8));
|
||||||
let top = r.top - tr.height - 8;
|
let top = r.top - tr.height - 8;
|
||||||
if (top < 8) top = r.bottom + 8;
|
if (top < 8) top = r.bottom + 8;
|
||||||
tip.style.left = `${left + window.scrollX}px`;
|
tip.style.left = `${left + window.pageXOffset}px`;
|
||||||
tip.style.top = `${top + window.scrollY}px`;
|
tip.style.top = `${top + window.pageYOffset}px`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideSegTip() {
|
function hideSegTip() {
|
||||||
|
|||||||
Reference in New Issue
Block a user