From 6f7708d368b310103ae88510d5ce2c7812f3d22c Mon Sep 17 00:00:00 2001 From: Didictateur Date: Wed, 25 Feb 2026 21:19:29 +0100 Subject: [PATCH] add hovering --- frontend/pages/riichi/chap5.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/frontend/pages/riichi/chap5.html b/frontend/pages/riichi/chap5.html index bb3b2b7..e1cfaaf 100644 --- a/frontend/pages/riichi/chap5.html +++ b/frontend/pages/riichi/chap5.html @@ -114,6 +114,12 @@ gap: 5px; padding: 20px 0 0 20px; } + + #hand-0 div:hover { + transform: translateY(-15px); + transition: transform 0.2s; + z-index: 2; + } @@ -197,6 +203,16 @@ // Fonction d'affichage d'une main function displayHand(hand, displayId) { const display = document.getElementById(displayId); + // Pour hand-0, on compare l'état actuel + if (displayId === 'hand-0') { + // Génère une signature simple de la main + const handSignature = hand.map(tile => tile.id).join(',') + (window.lastDrawTile || ''); + if (display.dataset.signature === handSignature) { + // Rien n'a changé, on ne réécrit pas + return; + } + display.dataset.signature = handSignature; + } display.innerHTML = ''; hand.forEach(tile => { const tileDiv = document.createElement('div');