mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-23 05:26:15 -04:00
Build 29067205
This commit is contained in:
parent
be49fb9d6e
commit
eb846327e5
18 changed files with 75 additions and 37 deletions
|
@ -8,9 +8,7 @@ export function setupTooltips() {
|
|||
}
|
||||
|
||||
function updateTooltipPosition(e: MouseEvent) {
|
||||
tooltip.style.transform =
|
||||
`translate(${e.clientX}px,${e.clientY + 20}px) ` +
|
||||
(e.clientX > window.innerWidth / 2 ? " translate(-100%,0)" : "");
|
||||
tooltip.style.transform = `translate(${e.clientX}px,${e.clientY}px) translate(${e.clientX > window.innerWidth / 2 ? "-100%" : "0"},${e.clientY > (window.innerHeight * 2) / 3 ? "-100%" : "20px"})`;
|
||||
}
|
||||
|
||||
function closeToolTip() {
|
||||
|
@ -53,7 +51,11 @@ export function setupTooltips() {
|
|||
},
|
||||
true,
|
||||
);
|
||||
document.body.addEventListener("mouseleave", (e) => {
|
||||
closeToolTip();
|
||||
});
|
||||
document.body.addEventListener(
|
||||
"mouseleave",
|
||||
(e) => {
|
||||
closeToolTip();
|
||||
},
|
||||
true,
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue