Make mirror rotate on click
This commit is contained in:
@@ -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)`;
|
||||
|
||||
Reference in New Issue
Block a user