X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=www%2Fjs%2Fchessboard-0.3.0.js;h=f69d0ed3802968a07c2ee533464565c82cb7a88e;hb=dc7fb3ce880439ad1c024681a437b1d2c599af86;hp=412df0225ddbaed8035d0ea768633f9c8c71e5c0;hpb=e45343cc238c87b789fd25a71db48659519f9e72;p=remoteglot diff --git a/www/js/chessboard-0.3.0.js b/www/js/chessboard-0.3.0.js index 412df02..f69d0ed 100644 --- a/www/js/chessboard-0.3.0.js +++ b/www/js/chessboard-0.3.0.js @@ -1247,7 +1247,7 @@ function mousedownSquare(e) { } // do nothing if we're not draggable - if (cfg.draggable) return; + if (!cfg.draggable) return; beginDraggingPiece(square, CURRENT_POSITION[square], e.pageX, e.pageY); } @@ -1259,7 +1259,7 @@ function touchstartSquare(e) { } // do nothing if we're not draggable - if (cfg.draggable) return; + if (!cfg.draggable) return; var square = target.getAttribute('data-square'); @@ -1302,10 +1302,6 @@ function touchendWindow(e) { // do nothing if we are not dragging a piece if (!DRAGGING_A_PIECE) return; - // get the location - var location = isXYOnSquare(e.changedTouches[0].pageX, - e.changedTouches[0].pageY); - stopDraggedPiece(findSquareFromEvent(e.changedTouches[0].pageX, e.changedTouches[0].pageY)); }