From: Steinar H. Gunderson Date: Wed, 28 Dec 2022 21:33:50 +0000 (+0100) Subject: Remove more offboard logic we do not need. X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=15102005d9e0c8eacac16b2a955cd7bf2e4879a1;hp=9cb18b849dd6993c6c9861a8c474e5d259c99dd9;p=remoteglot Remove more offboard logic we do not need. --- diff --git a/www/js/chessboard-0.3.0.js b/www/js/chessboard-0.3.0.js index a1a6fbc..a846f80 100644 --- a/www/js/chessboard-0.3.0.js +++ b/www/js/chessboard-0.3.0.js @@ -1089,12 +1089,6 @@ function stopDraggedPiece(location) { typeof cfg.onDrop === 'function') { var newPosition = deepCopy(CURRENT_POSITION); - // source piece was on the board and position is off the board - if (validSquare(DRAGGED_PIECE_SOURCE) === true && location === 'offboard') { - // remove the piece from the board - delete newPosition[DRAGGED_PIECE_SOURCE]; - } - // source piece was on the board and position is on the board if (validSquare(DRAGGED_PIECE_SOURCE) === true && validSquare(location) === true) {