From 21e0a00488f5a40271a1a2baff5f1df97c62c3cd Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Fri, 23 Dec 2022 23:06:29 +0100 Subject: [PATCH] Fix transitionProperty syntax. --- www/js/chessboard-0.3.0.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/www/js/chessboard-0.3.0.js b/www/js/chessboard-0.3.0.js index e15ab00..d1d53f1 100644 --- a/www/js/chessboard-0.3.0.js +++ b/www/js/chessboard-0.3.0.js @@ -726,7 +726,7 @@ function animateSquareToSquare(src, dest, piece, completeFn) { // animate the piece to the destination square animatedPieceEl.addEventListener('transitionend', complete, {once: true}); requestAnimationFrame(() => { - animatedPieceEl.style.transitionProperty = 'top left'; + animatedPieceEl.style.transitionProperty = 'top, left'; animatedPieceEl.style.transitionDuration = cfg.moveSpeed + 'ms'; animatedPieceEl.style.top = destSquarePosition.top + 'px'; animatedPieceEl.style.left = destSquarePosition.left + 'px'; @@ -1118,7 +1118,7 @@ function snapbackDraggedPiece() { // animate the piece to the target square draggedPieceEl.addEventListener('transitionend', complete, {once: true}); requestAnimationFrame(() => { - draggedPieceEl.style.transitionProperty = 'top left'; + draggedPieceEl.style.transitionProperty = 'top, left'; draggedPieceEl.style.transitionDuration = cfg.snapbackSpeed + 'ms'; draggedPieceEl.style.top = sourceSquarePosition.top + 'px'; draggedPieceEl.style.left = sourceSquarePosition.left + 'px'; @@ -1176,7 +1176,7 @@ function dropDraggedPieceOnSquare(square) { // snap the piece to the target square draggedPieceEl.addEventListener('transitionend', complete, {once: true}); requestAnimationFrame(() => { - draggedPieceEl.style.transitionProperty = 'top left'; + draggedPieceEl.style.transitionProperty = 'top, left'; draggedPieceEl.style.transitionDuration = cfg.snapSpeed + 'ms'; draggedPieceEl.style.top = targetSquarePosition.top + 'px'; draggedPieceEl.style.left = targetSquarePosition.left + 'px'; -- 2.39.2