landscape navbar centering: reset portrait margin-right on .container-fluid + margin-left on .navbar-brand so sidebar contents align to horizontal centre; showGuard gains invertY option for modal-grid callers (role-select cards fly away from centre); gameboard.js showPortals gains viewport-half detection so game-kit tooltips show below when tokens are in upper half (landscape clip fix); position-strip top: 0; tighten gear-btn btn-abandon selector to #id_room_menu scope
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-04-05 16:54:03 -04:00
parent 40a55721ab
commit 40c747a837
6 changed files with 25 additions and 9 deletions

View File

@@ -185,7 +185,8 @@ var RoleSelect = (function () {
function () { // dismiss (NVM / outside click)
card.classList.remove("guard-active");
card.classList.remove("flipped");
}
},
{ invertY: true } // modal grid: tooltip flies away from centre (upper→above, lower→below)
);
});

View File

@@ -139,8 +139,18 @@ function initGameKitTooltips() {
const rawLeft = tokenRect.left + tokenRect.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(tokenRect.top) + 'px';
portal.style.transform = `translate(-50%, calc(-100% - 0.5rem - ${miniHeight}px))`;
// Show above when token is in lower viewport half; below when in upper half
// (avoids clipping when game-kit tokens sit near the top in landscape mode).
const tokenCenterY = tokenRect.top + tokenRect.height / 2;
const showBelow = tokenCenterY < window.innerHeight / 2;
if (showBelow) {
portal.style.top = Math.round(tokenRect.bottom) + 'px';
portal.style.transform = 'translate(-50%, 0.5rem)';
} else {
portal.style.top = Math.round(tokenRect.top) + 'px';
portal.style.transform = `translate(-50%, calc(-100% - 0.5rem - ${miniHeight}px))`;
}
if (isEquippable) {
const mainRect = portal.getBoundingClientRect();