chessboardjs icon indicating copy to clipboard operation
chessboardjs copied to clipboard

chessboard is unable to work properly

Open mattds9 opened this issue 8 years ago • 4 comments

the chessboard animation doesn't seem to load properly, just getting a line down the left side for the chess pieces.

mattds9 avatar Apr 05 '16 06:04 mattds9

Need more information in order to be able to diagnose this.

oakmac avatar Apr 05 '16 14:04 oakmac

code below,

<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template 
![problem](https://cloud.githubusercontent.com/assets/16694096/14301794/7538ba74-fb4f-11e5-962a-94bf1a9dfb7e.png)
in the editor.
-->
<html>
    <head>
          <link rel="stylesheet" href="css/normalize-2.1.2.min.css" />
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" />
  <link rel="stylesheet" href="css/site2.css" />
  <link rel="stylesheet" href="css/chessboard.css" />
        <script src="js/jquery-1.10.1.min.js"></script>
        <script src="js/jquery.color.min.js"></script>
        <script src="js/json3.min.js"></script>
        <script src="js/chess.js"></script>
        <script src="js/chessboard-0.3.0.js"></script>
        <script src="js/chessboard.js"></script>
        <script src="js/home.js"></script>
        <script src="js/prettify.js"></script>

        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
<div id="board2" style="width: 400px"></div>
<input type="button" id="startBtn" value="Start" />
<input type="button" id="clearBtn" value="Clear" />
<script>var board2 = ChessBoard('board2', {
  draggable: true,
  dropOffBoard: 'trash',
  sparePieces: true
});
$('#startBtn').on('click', board2.start);
$('#clearBtn').on('click', board2.clear);</script>
    </body>
</html>

mattds9 avatar Apr 05 '16 23:04 mattds9

Looks okay over here. Try downloading the original from http://chessboardjs.com/ and see if it has the same problem. If not, you can compare the two to track down the issue.

user14159 avatar Apr 07 '16 22:04 user14159

@mattds9 not sure if you're still having trouble getting the board to appear.

The issue may have to do with how the chess piece images are being served. By default, they should be reachable on your host at /img/chesspieces/wikipedia/{piece}.png. Take a look at config.pieceTheme and /img/chesspieces/ for more inspiration.

allonhadaya avatar Sep 12 '16 17:09 allonhadaya