From cc7826d7048273442975601b43b25020c0987aa0 Mon Sep 17 00:00:00 2001 From: andrei-markeev Date: Wed, 11 Sep 2013 23:43:05 +0300 Subject: [PATCH] If start dragging right after stop, and animation is enabled, the piece gets duplicated after animation is ended. Fixed that. --- js/chessboard.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/chessboard.js b/js/chessboard.js index 64ff1d2d..c9084687 100644 --- a/js/chessboard.js +++ b/js/chessboard.js @@ -970,6 +970,7 @@ function drawPositionInstant() { // add the pieces for (var i in CURRENT_POSITION) { if (CURRENT_POSITION.hasOwnProperty(i) !== true) continue; + if (DRAGGING_A_PIECE && DRAGGED_PIECE_SOURCE == i) continue; $('#' + SQUARE_ELS_IDS[i]).append(buildPiece(CURRENT_POSITION[i])); }