willb335 / chessboardjsx

:black_square_button: Chessboard built for React
https://chessboardjsx.com
MIT License
267 stars 79 forks source link

Update with more props is needed #39

Closed P1Wvrs closed 5 years ago

P1Wvrs commented 5 years ago

Hello , I am integrating Chessboard.jsx which happens to be very smooth and efficient . But I did find some differences between Chessboard.js and Chessboard.jsx functionalities. And how can I implement "OnDragStart" in Chessboard.jsx ? Will the upcoming versions of Chessboard.jsx have the missing props ? It will be of great help if I get to know when will the updates be available and what are the new features to be added in the next version , so that I can put my code accordingly and think for future scope .

willb335 commented 5 years ago

how can I implement "OnDragStart"

Fool around with allowDrag

I don't know what functionality you need. What idea are you trying to implement? Chessboardsjsx is not mapped to chessboardjs 1 to 1 as you are surely aware.

Will the upcoming versions of Chessboard.jsx have the missing props

Not many updates in the pipeline :)

popovitsj commented 5 years ago

I'm also missing an onDrag or onDragStart property. The functionality I'm trying to implement that would benefit from that is showing valid squares to move to. I can look into if allowDrag() can be used for this, but it seems like an ugly workaround. The onDragOverSquare doesn't help me much, because it is only give me the square, not the piece.

willb335 commented 5 years ago

I'm going to close this, it seems you may want to consider using chessboardjs inside React's lifecycle hooks to get the functionality you need

P1Wvrs commented 5 years ago

Yes @willb335 . And thanx for all the replies . Much appreciated .