Smooth held card transition and scale font with card size
Remove scale(1.15) size jump on held card, keep gold border/glow highlight. Set animation card font-size proportionally to card width so text matches across deck, hand, and opponent card sizes. Animate font-size during swaps so text scales smoothly as cards travel between different-sized positions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3107,10 +3107,8 @@ class GolfGame {
|
||||
this.heldCardFloating.style.height = `${cardHeight}px`;
|
||||
|
||||
// Position discard button attached to right side of held card
|
||||
const scaledWidth = cardWidth * 1.15; // Account for scale transform
|
||||
const scaledHeight = cardHeight * 1.15;
|
||||
const buttonLeft = cardLeft + scaledWidth / 2 + cardWidth / 2; // Right edge of scaled card (no gap)
|
||||
const buttonTop = cardTop + (scaledHeight - cardHeight) / 2 + cardHeight * 0.3; // Vertically centered on card
|
||||
const buttonLeft = cardLeft + cardWidth; // Right edge of card (no gap)
|
||||
const buttonTop = cardTop + cardHeight * 0.3; // Vertically centered on card
|
||||
this.discardBtn.style.left = `${buttonLeft}px`;
|
||||
this.discardBtn.style.top = `${buttonTop}px`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user