discard in the right place

This commit is contained in:
Didictateur 2026-03-14 10:21:16 +01:00
parent 4dabff91d3
commit b28046d935

View file

@ -140,8 +140,8 @@
#discard-0 { #discard-0 {
position: absolute; position: absolute;
transform: translate(-50%, 50%); transform: translate(-50%, 50%);
bottom: 25%; bottom: 16%;
left: 50%; left: 48%;
display: block; display: block;
width: 250px; width: 250px;
height: auto; height: auto;
@ -151,8 +151,8 @@
#discard-1 { #discard-1 {
position: absolute; position: absolute;
transform: translate(-50%, -400%) rotate(-90deg) translate(0%, 450%); transform: translate(-50%, -400%) rotate(-90deg) translate(0%, 450%);
bottom: -25%; bottom: 25%;
left: 50%; left: 58%;
display: block; display: block;
width: 250px; width: 250px;
height: auto; height: auto;
@ -162,8 +162,8 @@
#discard-2 { #discard-2 {
position: absolute; position: absolute;
transform: translate(-50%, -400%) rotate(180deg) translate(0%, 450%); transform: translate(-50%, -400%) rotate(180deg) translate(0%, 450%);
bottom: -25%; bottom: 35%;
left: 50%; left: 50.5%;
display: block; display: block;
width: 250px; width: 250px;
height: auto; height: auto;
@ -173,8 +173,8 @@
#discard-3 { #discard-3 {
position: absolute; position: absolute;
transform: translate(-50%, -400%) rotate(90deg) translate(0%, 450%); transform: translate(-50%, -400%) rotate(90deg) translate(0%, 450%);
bottom: -25%; bottom: 27.5%;
left: 50%; left: 40%;
display: block; display: block;
width: 250px; width: 250px;
height: auto; height: auto;
@ -189,8 +189,8 @@
} }
.discard-tile svg { .discard-tile svg {
height: 50px; height: 65px;
width: 35px; width: 48px;
} }
</style> </style>
</head> </head>
@ -336,8 +336,8 @@
// Calculer la position en grille (6 tuiles par ligne) // Calculer la position en grille (6 tuiles par ligne)
const row = Math.floor(tileIndex / 6); const row = Math.floor(tileIndex / 6);
const col = tileIndex % 6; const col = tileIndex % 6;
const x = col * 37; // 35px width + 2px gap const x = col * 50;
const y = row * 52; // 50px height + 2px gap const y = row * 67;
tileDiv.style.position = 'absolute'; tileDiv.style.position = 'absolute';
tileDiv.style.left = x + 'px'; tileDiv.style.left = x + 'px';