From 3414bfad1add8f43b6e1ae29c4ad4e88ddc1de3d Mon Sep 17 00:00:00 2001 From: adlee-was-taken Date: Sun, 22 Feb 2026 18:12:46 -0500 Subject: [PATCH] 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 --- client/app.js | 3 ++- client/card-animations.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/app.js b/client/app.js index 50dfa6e..ad5f79f 100644 --- a/client/app.js +++ b/client/app.js @@ -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; diff --git a/client/card-animations.js b/client/card-animations.js index ad00d0d..afc1808 100644 --- a/client/card-animations.js +++ b/client/card-animations.js @@ -46,7 +46,8 @@ class CardAnimations { 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); return { left: centerX - cardWidth / 2,