Improve initial card flip animation appearance
Style the flip overlay's front face to match player hand cards (gradient background, proper border/shadow) instead of using generic card-front styles. Hide the underlying card during the animation so the green table shows through the flip rather than a white card peeking behind it. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2898,6 +2898,11 @@ class GolfGame {
|
||||
if (window.cardAnimations) {
|
||||
window.cardAnimations.animateInitialFlip(cardEl, cardData, () => {
|
||||
this.animatingPositions.delete(key);
|
||||
// Unhide the current card element (may have been rebuilt by renderGame)
|
||||
const currentCards = this.playerCards.querySelectorAll('.card');
|
||||
if (currentCards[position]) {
|
||||
currentCards[position].style.visibility = '';
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Fallback if card animations not available
|
||||
@@ -4172,7 +4177,13 @@ class GolfGame {
|
||||
cardEl.firstChild.addEventListener('click', () => this.handleCardClick(index));
|
||||
// V3_13: Bind tooltip events for face-up cards
|
||||
this.bindCardTooltipEvents(cardEl.firstChild, displayCard);
|
||||
this.playerCards.appendChild(cardEl.firstChild);
|
||||
const appendedCard = cardEl.firstChild;
|
||||
this.playerCards.appendChild(appendedCard);
|
||||
|
||||
// Hide card if flip animation overlay is active on this position
|
||||
if (this.animatingPositions.has(`local-${index}`)) {
|
||||
appendedCard.style.visibility = 'hidden';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user