Make mirror rotate on click

This commit is contained in:
Sysy's
2026-03-31 09:32:59 +02:00
committed by M1n-0
parent 6d81f67ddf
commit 853a6ae9ee

View File

@@ -76,6 +76,9 @@ function loadGrid() {
break;
case legend.mirror:
const currentAngle = mirrorOrientations[`${y},${x}`] || 0;
cell.onclick = () => {
rotateMirror(x, y);
}
const btnMirror = document.createElement("button");
btnMirror.classList.add("btn-mirror");
btnMirror.style.transform = `rotate(${currentAngle}deg)`;