From 15102005d9e0c8eacac16b2a955cd7bf2e4879a1 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Wed, 28 Dec 2022 22:33:50 +0100 Subject: [PATCH] Remove more offboard logic we do not need. --- www/js/chessboard-0.3.0.js | 6 ------ 1 file changed, 6 deletions(-) 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) { -- 2.39.2