cm-chessboard 3.16.4 → 3.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "3.16.4",
3
+ "version": "3.16.5",
4
4
  "description": "A JavaScript chessboard which is lightweight, ES6 module based, responsive, SVG rendered and without dependencies.",
5
5
  "keywords": [
6
6
  "chess",
@@ -336,20 +336,12 @@ export class ChessboardView {
336
336
  const nextAnimation = this.animationQueue.shift()
337
337
  if (nextAnimation !== undefined) {
338
338
  this.animationRunning = true
339
+ this.drawPieces(nextAnimation.fromSquares);
339
340
  this.currentAnimation = new ChessboardPiecesAnimation(this, nextAnimation.fromSquares, nextAnimation.toSquares, this.chessboard.props.animationDuration / (this.animationQueue.length + 1), () => {
340
- if (!this.moveInput.draggablePiece) {
341
- this.drawPieces(nextAnimation.toSquares)
342
- this.animationRunning = false
343
- this.nextPieceAnimationInQueue()
344
- if (nextAnimation.callback) {
345
- nextAnimation.callback()
346
- }
347
- } else {
348
- this.animationRunning = false
349
- this.nextPieceAnimationInQueue()
350
- if (nextAnimation.callback) {
351
- nextAnimation.callback()
352
- }
341
+ this.animationRunning = false
342
+ this.nextPieceAnimationInQueue()
343
+ if (nextAnimation.callback) {
344
+ nextAnimation.callback()
353
345
  }
354
346
  })
355
347
  }