cm-chessboard 7.7.0 → 7.7.2

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/README.md CHANGED
@@ -78,7 +78,7 @@ examples.
78
78
  Below is the default configuration
79
79
 
80
80
  ```javascript
81
- this.props = {
81
+ this.props = {
82
82
  position: FEN.empty, // set position as fen, use FEN.start or FEN.empty as shortcuts
83
83
  orientation: COLOR.white, // white on bottom
84
84
  responsive: true, // resize the board automatically to the size of the context element
@@ -65,7 +65,9 @@ await board.movePiece("d5", "f4")
65
65
  return board.setPosition(position, animated)
66
66
  }
67
67
  window.switchOrientation = (animated) => {
68
- board.setOrientation(board.getOrientation() === 'w' ? 'b' : 'w', animated)
68
+ board.setOrientation(board.getOrientation() === 'w' ? 'b' : 'w', animated).then(() => {
69
+ console.log("board.getOrientation()", board.getOrientation())
70
+ })
69
71
  }
70
72
  window.movePiece = () => {
71
73
  const squareFrom = document.getElementById("moveFrom").value
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "7.7.0",
3
+ "version": "7.7.2",
4
4
  "description": "A JavaScript chessboard which is lightweight, ES6 module based, responsive, SVG rendered and without dependencies.",
5
5
  "keywords": [
6
6
  "chess",