Sync held card position across all animation paths for mobile portrait
Update getHoldingRect() in card-animations.js and the second held card positioning path in app.js to use the same reduced overlap offset on mobile portrait. All three places that compute the held position now use 0.15 on mobile-portrait vs 0.35 on desktop/landscape. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3608,7 +3608,8 @@ class GolfGame {
|
||||
const centerX = (deckRect.left + deckRect.right + discardRect.left + discardRect.right) / 4;
|
||||
const cardWidth = deckRect.width;
|
||||
const cardHeight = deckRect.height;
|
||||
const overlapOffset = cardHeight * 0.35;
|
||||
const isMobilePortrait = document.body.classList.contains('mobile-portrait');
|
||||
const overlapOffset = cardHeight * (isMobilePortrait ? 0.15 : 0.35);
|
||||
const cardLeft = centerX - cardWidth / 2;
|
||||
const cardTop = deckRect.top - overlapOffset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user