Commit 18c0006d authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix: inject hand/drag styles after component creation

Styles were injected before hand/drag were instantiated, resulting in
zero-dimension tiles (CSS classes never added to page).
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent fcff8eb1
...@@ -25,7 +25,6 @@ export function mountGame(el, params) { ...@@ -25,7 +25,6 @@ export function mountGame(el, params) {
dealNewRound(); dealNewRound();
el.innerHTML = buildLayout(mode); el.innerHTML = buildLayout(mode);
injectStyles(el);
const boardContainer = el.querySelector('#domino-board'); const boardContainer = el.querySelector('#domino-board');
board = new DominoBoard(boardContainer, { board = new DominoBoard(boardContainer, {
...@@ -46,6 +45,8 @@ export function mountGame(el, params) { ...@@ -46,6 +45,8 @@ export function mountGame(el, params) {
getEnds: () => ({ leftEnd: state.leftEnd, rightEnd: state.rightEnd }) getEnds: () => ({ leftEnd: state.leftEnd, rightEnd: state.rightEnd })
}); });
injectStyles(el);
updateUI(el); updateUI(el);
refreshHand(); refreshHand();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment