chessboardjsx
chessboardjsx copied to clipboard
with animation, the transition duration creates a pause of exactly that time before each move
To reproduce, set animation to true, and set transitionDuration to something large e.g. 5000. This will create a 5 second pause before the move, which will then also last for 5 seconds.
This looks like a result of some weird behaviour with waitForTransition. I have tried a couple of ways of fixing this but to no avail.
waitForTransitioncannot just be set to false as it is also used as a truth value for getting transition coordinates - (search forwaitfortransition &&- This shouldn't be the case, they have different meanings/usages).
We also cannot just remove the setTimeout functions under the comment // Give piece time to transition. - this fixes the first transition, but prevents transitions on anything afterwards.
I think the transition coords/behaviour should be supplied piece by piece, not to the whole board. Because it is supplied to whole board, it appears the setTimeout code is needed to stop piece transitions being removed on rerender (via waitForTransition being set to false).
Is there a simple way you can think of to get rid of the delay before each piece moves?
I'm looking into this. My initial impression is this might take a substantial rewrite to getDerivedStateFromProps and componentDidUpdate.
I'm going to hold off on fixing this. This would take a substantial amount of time, I may have to label this library as unmaintained shortly. I apologize for not being of more help. I hope you can find a way around this issue
Ok no worries, I'll let you know if I get chance to make a PR
On Fri, 1 Nov 2019 at 14:46, Will [email protected] wrote:
I'm going to hold off on fixing this. This would take a substantial amount of time, I may have to label this library as unmaintained shortly. I apologize for not being of more help. I hope you can find a way around this issue
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/willb335/chessboardjsx/issues/45?email_source=notifications&email_token=AB5Z2M6GHFCOACKPGJHLC7LQRQXKFA5CNFSM4JGFYQN2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC26WBY#issuecomment-548793095, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5Z2M7VXYCPMN4HJONVXEDQRQXKFANCNFSM4JGFYQNQ .