]> git.sesse.net Git - remoteglot/commitdiff
Fix transitionProperty syntax.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 23 Dec 2022 22:06:29 +0000 (23:06 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 23 Dec 2022 22:06:29 +0000 (23:06 +0100)
www/js/chessboard-0.3.0.js

index e15ab00ff5d57b2d3ed61c6c683967e7f3b564b2..d1d53f133da062cfc364e7a597c774c2084b068d 100644 (file)
@@ -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';