Skip to content

Commit a74b3a3

Browse files
committed
Position Left/Right cards partially off-screen
1 parent 3d21175 commit a74b3a3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

playing-cards-2-planes/Left.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ export class Left extends Container {
114114
const totalCardsHeight = (totalCards - 1) * spacingBetweenCards;
115115
const firstCardY = this._screen.height / 2 - totalCardsHeight / 2;
116116

117-
// Fixed X position near left edge
118-
const cardX = CARD_WIDTH / 2 + CARD_WIDTH / 6;
117+
// Fixed X position near left edge, partially off-screen like Hand.js
118+
const cardX = CARD_VISIBLE_RATIO * CARD_WIDTH;
119119

120120
const middleIndex = (totalCards - 1) / 2;
121121

playing-cards-2-planes/Right.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ export class Right extends Container {
114114
const totalCardsHeight = (totalCards - 1) * spacingBetweenCards;
115115
const firstCardY = this._screen.height / 2 - totalCardsHeight / 2;
116116

117-
// Fixed X position near right edge
118-
const cardX = this._screen.width - CARD_WIDTH / 2 - CARD_WIDTH / 6;
117+
// Fixed X position near right edge, partially off-screen like Hand.js
118+
const cardX = this._screen.width - CARD_VISIBLE_RATIO * CARD_WIDTH;
119119

120120
const middleIndex = (totalCards - 1) / 2;
121121

0 commit comments

Comments
 (0)