cm-chessboard 4.3.1 → 4.3.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
@@ -85,24 +85,25 @@ Below is the default configuration
85
85
 
86
86
  ```javascript
87
87
  let defaultProps = {
88
- position: "empty", // set as fen, "start" or "empty"
89
- orientation: COLOR.white, // white on bottom
90
- responsive: true, // resize the board automatically to the size of the context element
91
- animationDuration: 300, // pieces animation duration in milliseconds. Disable all animation with `0`.
92
- language: navigator.language.substring(0, 2).toLowerCase(), // supports "de" and "en" for now, used for pieces naming
93
- style: {
94
- cssClass: "default", // set the css theme of the board, try "green", "blue" or "chess-club"
95
- showCoordinates: true, // show ranks and files
96
- borderType: BORDER_TYPE.none, // "thin" thin border, "frame" wide border with coordinates in it, "none" no border
97
- aspectRatio: 1, // height/width of the board
98
- moveFromMarker: MARKER_TYPE.frame, // the marker used to mark the start square
99
- moveToMarker: MARKER_TYPE.frame, // the marker used to mark the square where the figure is moving to
100
- },
101
- sprite: {
102
- url: "./assets/images/chessboard-sprite.svg", // pieces and markers are stored in a sprite file
103
- size: 40, // the sprite tiles size, defaults to 40x40px
104
- cache: true // cache the sprite
105
- }
88
+ position: "empty", // set as fen, "start" or "empty"
89
+ orientation: COLOR.white, // white on bottom
90
+ responsive: true, // resize the board automatically to the size of the context element
91
+ animationDuration: 300, // pieces animation duration in milliseconds. Disable all animation with `0`.
92
+ language: navigator.language.substring(0, 2).toLowerCase(), // supports "de" and "en" for now, used for pieces naming
93
+ style: {
94
+ cssClass: "default", // set the css theme of the board, try "green", "blue" or "chess-club"
95
+ showCoordinates: true, // show ranks and files
96
+ borderType: BORDER_TYPE.none, // "thin" thin border, "frame" wide border with coordinates in it, "none" no border
97
+ aspectRatio: 1, // height/width of the board
98
+ moveFromMarker: MARKER_TYPE.frame, // the marker used to mark the start square
99
+ moveToMarker: MARKER_TYPE.frame, // the marker used to mark the square where the figure is moving to
100
+ },
101
+ sprite: {
102
+ url: "./assets/images/chessboard-sprite.svg", // pieces and markers are stored in a sprite file
103
+ size: 40, // the sprite tiles size, defaults to 40x40px
104
+ cache: true // cache the sprite
105
+ },
106
+ extensions: [ /* {class: ExtensionClass, props: { ... }} */ ] // add extensions here
106
107
  }
107
108
  ```
108
109
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "4.3.1",
3
+ "version": "4.3.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",
@@ -67,7 +67,7 @@ export class Chessboard {
67
67
  size: 40, // the sprite tiles size, defaults to 40x40px
68
68
  cache: true // cache the sprite
69
69
  },
70
- extensions: [ /* {class: ExtensionClass, props: { ... }} */ ] // add extensions here like this
70
+ extensions: [ /* {class: ExtensionClass, props: { ... }} */ ] // add extensions here
71
71
  }
72
72
  this.props = {}
73
73
  Object.assign(this.props, defaultProps)