Closed invisionweb closed 1 year ago
I'm finding it difficult to create a piece drag and drop feature like https://lichess.org/editor. The extra new pieces will be outside the board. How the event afterNewPiece() can be triggered?
movable?: { events?: { after?: (orig: cg.Key, dest: cg.Key, metadata: cg.MoveMetadata) => void; // called after the move has been played afterNewPiece?: (role: cg.Role, key: cg.Key, metadata: cg.MoveMetadata) => void; // called after a new piece is dropped on the board }; };
Look into Lichess' source code
Please, this is not an issue.
I'm finding it difficult to create a piece drag and drop feature like https://lichess.org/editor. The extra new pieces will be outside the board. How the event afterNewPiece() can be triggered?