]> git.sesse.net Git - remoteglot/commitdiff
Remove more offboard logic we do not need.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 28 Dec 2022 21:33:50 +0000 (22:33 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 28 Dec 2022 21:33:50 +0000 (22:33 +0100)
www/js/chessboard-0.3.0.js

index a1a6fbcb2523cc2ba5274f9dbdac15bf7fb6a8a1..a846f80db510b42014601505cad962a483169991 100644 (file)
@@ -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) {