mirror of
https://github.com/AndrioCelos/TableturfBattleApp.git
synced 2026-03-21 17:34:28 -05:00
Fix game board display issues
This commit is contained in:
parent
978e08fddf
commit
5b36ec6bf1
|
|
@ -85,8 +85,7 @@ class Board {
|
|||
const x2 = this.touch[3] + dx;
|
||||
const y2 = this.touch[4] + dy;
|
||||
if (this.highlightX != x2 || this.highlightY != y2) {
|
||||
this.highlightX = x2;
|
||||
this.highlightY = y2;
|
||||
this.moveHighlight((x, y, r) => [x2, y2, r], true);
|
||||
}
|
||||
this.refreshHighlight();
|
||||
}
|
||||
|
|
@ -200,10 +199,9 @@ class Board {
|
|||
|
||||
this.grid = grid || this.grid;
|
||||
|
||||
while (this.table.firstChild) {
|
||||
this.table.removeChild(this.table.firstChild);
|
||||
}
|
||||
clearChildren(this.table);
|
||||
this.cells.splice(0);
|
||||
this.highlightedCells.splice(0);
|
||||
|
||||
const boardWidth = grid.length;
|
||||
const boardHeight = grid[0].length;
|
||||
|
|
|
|||
|
|
@ -73,8 +73,7 @@ function showReady(playerIndex: number) {
|
|||
|
||||
function clearPlayContainers() {
|
||||
for (const container of playContainers) {
|
||||
while (container.firstChild)
|
||||
container.removeChild(container.firstChild);
|
||||
clearChildren(container);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -488,6 +488,9 @@ dialog::backdrop {
|
|||
opacity: 1;
|
||||
color: var(--primary-colour-1);
|
||||
}
|
||||
#gameDeckButton {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#boardSection {
|
||||
grid-column: board-column;
|
||||
|
|
@ -938,8 +941,7 @@ dialog::backdrop {
|
|||
}
|
||||
|
||||
#gameBoard {
|
||||
width: calc(75vw - 0.5em);
|
||||
height: initial;
|
||||
height: min(calc(min(3.5%, calc(75vw / var(--board-width))) * var(--board-height)));
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user