Fix opponent swap animation instant shrink on mobile portrait
Let overlay card start at deck size and smoothly scale down to opponent card size during the arc, instead of instantly shrinking before animating. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
55006d6ff4
commit
a0bb28d5eb
@ -2807,16 +2807,7 @@ class GolfGame {
|
||||
|
||||
// Use unified swap animation
|
||||
if (window.cardAnimations) {
|
||||
// For opponent swaps, size the held card to match the opponent card
|
||||
// rather than the deck size (default holding rect uses deck dimensions,
|
||||
// which looks oversized next to small opponent cards on mobile)
|
||||
const holdingRect = window.cardAnimations.getHoldingRect();
|
||||
const heldRect = holdingRect ? {
|
||||
left: holdingRect.left,
|
||||
top: holdingRect.top,
|
||||
width: sourceRect.width,
|
||||
height: sourceRect.height
|
||||
} : null;
|
||||
const heldRect = window.cardAnimations.getHoldingRect();
|
||||
|
||||
window.cardAnimations.animateUnifiedSwap(
|
||||
discardCard, // handCardData - card going to discard
|
||||
|
||||
Loading…
Reference in New Issue
Block a user