oakmac / chessboardjs

JavaScript chessboard
https://chessboardjs.com
MIT License
2.02k stars 406 forks source link

chessboarjs doesn't go well with ionic #104

Closed rohandalvi closed 9 years ago

rohandalvi commented 9 years ago

I tried to use chessboard js with ionic you can checkout the code in my github repository here https://github.com/rohandalvi/ionicChess/blob/master/www/js/controllers.js .

Here I am using the Integration of chessboardjs with chessjs as provided on the website link to only allow legal moves, here:

http://chessboardjs.com/examples#5000

As you can see from the screenshot below, whenever I try to drag a piece on the board, the piece just disappears until it has been dropped. I am not sure of what the issue is . Here is the screenshot.

screen shot 2015-08-13 at 10 54 00 pm
rohandalvi commented 9 years ago

As seen in the screenshot, I am trying to play d4 and took the screenshot while I was dragging the piece to the square, the pawn just disappears until I leave the drag. Please let me know if the issue is still not clear. Thanks !

fhinson commented 9 years ago

Hi @rohandalvi,

Try adding this to your css.

.piece-417db {
  z-index: 4000!important;
}
rohandalvi commented 9 years ago

Thanks, that worked!