cm-chessboard 8.6.1 → 8.7.0

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": "8.6.1",
3
+ "version": "8.7.0",
4
4
  "description": "A JavaScript chessboard which is lightweight, ES6 module based, responsive, SVG rendered and without dependencies.",
5
5
  "keywords": [
6
6
  "chess",
package/src/Chessboard.js CHANGED
@@ -112,8 +112,9 @@ export class Chessboard {
112
112
  return this.state.position.getPiece(square)
113
113
  }
114
114
 
115
+ /** return the position object since 2024-04-20 (8.7.0) */
115
116
  getPosition() {
116
- return this.state.position.getFen()
117
+ return this.state.position
117
118
  }
118
119
 
119
120
  getOrientation() {
@@ -130,6 +130,10 @@ export class Position {
130
130
  return file + rank
131
131
  }
132
132
 
133
+ toString() {
134
+ return this.getFen()
135
+ }
136
+
133
137
  clone() {
134
138
  const cloned = new Position()
135
139
  cloned.squares = this.squares.slice(0)