Skip to content

Conversation

@CVChrisWilson
Copy link

This allows you to use shorthand widget.fen() and get the FEN string that matches Chessboard.objToFen(newPos) within the onChange event. Without it calling widget.fen() within the onChange() event returns the value that matches Chessboard.objToFen(oldPos).

CVChrisWilson and others added 4 commits October 6, 2015 23:58
Seems impossible to get the updated fen string on trash/drop without
this. (I'm printing the fen string out on any user activity).
Enables widget.fen() to pass the current fen string when the onChange
event is called.
objToFen(oldPos/newPos) still return expected values.
I think this was the issue all along.
<code>Chessboard.objToFen(oldPos)</code> was returning the newPos and
vice versa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant