Lower held card position to just above the labels on mobile portrait
Reduce overlap offset from 1.15 to 0.65 so the held card sits at the DRAW/DISCARD label level rather than up in the opponents area. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
26bc151458
commit
d958258066
@ -3546,7 +3546,7 @@ class GolfGame {
|
|||||||
// Position card centered, overlapping both piles (lower than before)
|
// Position card centered, overlapping both piles (lower than before)
|
||||||
// On mobile portrait, place held card fully above the deck/discard area
|
// On mobile portrait, place held card fully above the deck/discard area
|
||||||
const isMobilePortrait = document.body.classList.contains('mobile-portrait');
|
const isMobilePortrait = document.body.classList.contains('mobile-portrait');
|
||||||
const overlapOffset = cardHeight * (isMobilePortrait ? 1.15 : 0.35);
|
const overlapOffset = cardHeight * (isMobilePortrait ? 0.65 : 0.35);
|
||||||
const cardLeft = centerX - cardWidth / 2;
|
const cardLeft = centerX - cardWidth / 2;
|
||||||
const cardTop = deckRect.top - overlapOffset;
|
const cardTop = deckRect.top - overlapOffset;
|
||||||
this.heldCardFloating.style.left = `${cardLeft}px`;
|
this.heldCardFloating.style.left = `${cardLeft}px`;
|
||||||
@ -3609,7 +3609,7 @@ class GolfGame {
|
|||||||
const cardWidth = deckRect.width;
|
const cardWidth = deckRect.width;
|
||||||
const cardHeight = deckRect.height;
|
const cardHeight = deckRect.height;
|
||||||
const isMobilePortrait = document.body.classList.contains('mobile-portrait');
|
const isMobilePortrait = document.body.classList.contains('mobile-portrait');
|
||||||
const overlapOffset = cardHeight * (isMobilePortrait ? 1.15 : 0.35);
|
const overlapOffset = cardHeight * (isMobilePortrait ? 0.65 : 0.35);
|
||||||
const cardLeft = centerX - cardWidth / 2;
|
const cardLeft = centerX - cardWidth / 2;
|
||||||
const cardTop = deckRect.top - overlapOffset;
|
const cardTop = deckRect.top - overlapOffset;
|
||||||
|
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class CardAnimations {
|
|||||||
const cardWidth = deckRect.width;
|
const cardWidth = deckRect.width;
|
||||||
const cardHeight = deckRect.height;
|
const cardHeight = deckRect.height;
|
||||||
const isMobilePortrait = document.body.classList.contains('mobile-portrait');
|
const isMobilePortrait = document.body.classList.contains('mobile-portrait');
|
||||||
const overlapOffset = cardHeight * (isMobilePortrait ? 1.15 : 0.35);
|
const overlapOffset = cardHeight * (isMobilePortrait ? 0.65 : 0.35);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
left: centerX - cardWidth / 2,
|
left: centerX - cardWidth / 2,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user