oakmac / chessboard2

chessboard.js v2
ISC License
81 stars 7 forks source link

onMoveEnd, showNotation, onDrop problems #49

Open eparisio opened 1 year ago

eparisio commented 1 year ago

Hi, i've noteced that this methods seems bugged on the site and in my implementation too, i try the example in your site and the flag showNotation at true don't show the positions and the onMoveEnd don't trigger, in facts the consoles messages don't show up. The onDrop method trigger an error "ReferenceError: Chessboard is not defined" and the onDrop with snapback trigger instead a "Cannot read properties of undefined (reading 'search')" on the "piece" variable.

another note that i made on the old chessboardjs issue track: onMoveEnd/onChange don't accept any 'snapback' event to revert the move, as the onDrop do. I'm trying to do the same logic of onDrop but on keyboard input triggering a board.move('') event, as you did in the "Only Allow Legal Moves" example. the only problem is that there are no other functions to inser the checks. i must to setup the logic before triggering the board.move() event?

tal412 commented 9 months ago

I'm facing with the notation problem too. The notations won't show at all.

oakmac commented 9 months ago

Notation / coordinates functionality is not finished yet. I have a working PR for it here, but I haven't looked at it too much recently.

veretennikovalexey commented 3 weeks ago

Notation / coordinates functionality is not finished yet. I have a working PR for it here, but I haven't looked at it too much recently.

Hello, thank you for your work

showNotation does not work, but it's ok, I'll be calculate it :)