restart hard dropped animation

This commit is contained in:
2026-01-16 01:31:15 +01:00
parent 26a4d113b5
commit 90b1251ebf

View File

@@ -123,7 +123,9 @@ let playerActions = {
scheduler.clearTimeout(lockDown) scheduler.clearTimeout(lockDown)
playSound(hardDropSound) playSound(hardDropSound)
while (matrix.piece.move(TRANSLATION.DOWN, ROTATION.NONE, true)) stats.score += 2 while (matrix.piece.move(TRANSLATION.DOWN, ROTATION.NONE, true)) stats.score += 2
matrixCard.classList.add("hard-dropped-table-animation") matrixCard.classList.remove("hard-dropped-table-animation")
matrixCard.offsetHeight;
matrixCard.classList.add("hard-dropped-table-animation") // restart animation
lockDown() lockDown()
return true return true
}, },