cm-chessboard 3.16.5 → 3.16.6
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.
|
@@ -105,6 +105,7 @@ board.enableMoveInput(inputHandler, COLOR.white)
|
|
|
105
105
|
|
|
106
106
|
const board = new Chessboard(document.getElementById("board"), {
|
|
107
107
|
position: chess.fen(),
|
|
108
|
+
// animationDuration: 2000,
|
|
108
109
|
sprite: {url: "../assets/images/chessboard-sprite-staunty.svg"},
|
|
109
110
|
style: {moveFromMarker: undefined, moveToMarker: undefined}, // disable standard markers
|
|
110
111
|
orientation: COLOR.white
|
|
@@ -112,4 +113,4 @@ board.enableMoveInput(inputHandler, COLOR.white)
|
|
|
112
113
|
board.enableMoveInput(inputHandler, COLOR.white)
|
|
113
114
|
</script>
|
|
114
115
|
</body>
|
|
115
|
-
</html>
|
|
116
|
+
</html>
|
package/favicon.ico
ADDED
|
Binary file
|
package/index.html
CHANGED
package/package.json
CHANGED
|
@@ -67,7 +67,7 @@ export class ChessboardView {
|
|
|
67
67
|
destroy() {
|
|
68
68
|
this.moveInput.destroy()
|
|
69
69
|
if (this.resizeObserver) {
|
|
70
|
-
this.resizeObserver.unobserve(this.chessboard.element)
|
|
70
|
+
this.resizeObserver.unobserve(this.chessboard.element)
|
|
71
71
|
}
|
|
72
72
|
if (this.resizeListener) {
|
|
73
73
|
window.removeEventListener("resize", this.resizeListener)
|
|
@@ -335,8 +335,8 @@ export class ChessboardView {
|
|
|
335
335
|
nextPieceAnimationInQueue() {
|
|
336
336
|
const nextAnimation = this.animationQueue.shift()
|
|
337
337
|
if (nextAnimation !== undefined) {
|
|
338
|
+
this.drawPieces(nextAnimation.fromSquares)
|
|
338
339
|
this.animationRunning = true
|
|
339
|
-
this.drawPieces(nextAnimation.fromSquares);
|
|
340
340
|
this.currentAnimation = new ChessboardPiecesAnimation(this, nextAnimation.fromSquares, nextAnimation.toSquares, this.chessboard.props.animationDuration / (this.animationQueue.length + 1), () => {
|
|
341
341
|
this.animationRunning = false
|
|
342
342
|
this.nextPieceAnimationInQueue()
|