From: Steinar H. Gunderson Date: Fri, 23 Dec 2022 22:06:29 +0000 (+0100) Subject: Fix transitionProperty syntax. X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=21e0a00488f5a40271a1a2baff5f1df97c62c3cd Fix transitionProperty syntax. --- 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';