many styling fixes, esp. for both landscape & portrait mobile UX tooltips & navbar; core.settings now permits another device on local net to access dev server
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -9,10 +9,13 @@ function initGameKitTooltips() {
|
||||
token.addEventListener('mouseenter', () => {
|
||||
const rect = token.getBoundingClientRect();
|
||||
portal.innerHTML = tooltip.innerHTML;
|
||||
portal.style.left = Math.round(rect.left + rect.width / 2) + 'px';
|
||||
portal.classList.add('active');
|
||||
const halfW = portal.offsetWidth / 2;
|
||||
const rawLeft = rect.left + rect.width / 2;
|
||||
const clampedLeft = Math.max(halfW + 8, Math.min(rawLeft, window.innerWidth - halfW - 8));
|
||||
portal.style.left = Math.round(clampedLeft) + 'px';
|
||||
portal.style.top = Math.round(rect.top) + 'px';
|
||||
portal.style.transform = 'translate(-50%, calc(-100% - 0.5rem))';
|
||||
portal.classList.add('active');
|
||||
});
|
||||
|
||||
token.addEventListener('mouseleave', () => {
|
||||
|
||||
Reference in New Issue
Block a user