Orient star hint grid vertically
This commit is contained in:
parent
023727d7a4
commit
8efe87fadf
2
app.js
2
app.js
@ -812,7 +812,7 @@
|
|||||||
grid.innerHTML = "";
|
grid.innerHTML = "";
|
||||||
grid.classList.toggle('has-stars', false);
|
grid.classList.toggle('has-stars', false);
|
||||||
if (!rows || !cols) return;
|
if (!rows || !cols) return;
|
||||||
grid.style.gridTemplateColumns = `repeat(${rows}, 1fr)`; // flip to spread horizontally first
|
grid.style.gridTemplateColumns = `repeat(${cols}, 1fr)`; // layout vertically taller than wide
|
||||||
for (let i = 0; i < (rows * cols); i++) {
|
for (let i = 0; i < (rows * cols); i++) {
|
||||||
const dot = document.createElement('div'); dot.className = 'star-dot'; grid.appendChild(dot);
|
const dot = document.createElement('div'); dot.className = 'star-dot'; grid.appendChild(dot);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user