cm-chessboard 7.0.1 → 7.0.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
@@ -8,7 +8,7 @@ in [chess-console](https://shaack.com/projekte/chess-console/examples/load-pgn.h
8
8
  [cm-fen-editor](https://shaack.com/projekte/cm-fen-editor/). They are all nice written ES6 Modules to handle different
9
9
  aspects of chess games.
10
10
 
11
- > Note: With version 7 I made a heavy refactoring. The chessboard props have been changed and the files structure also. Version 7 of the chessboard will not work out of the box, after an update from a version lower than version 7.
11
+ > Note: With version 7, I made a heavy allover refactoring. The chessboard props have been changed and the files structure also. Version 7 of the chessboard will not work out of the box, after an update from a version lower than version 7.
12
12
 
13
13
  ## Features
14
14
 
@@ -16,17 +16,17 @@ aspects of chess games.
16
16
  - [Can handle moves input via click or drag](https://shaack.com/projekte/cm-chessboard/examples/validate-moves.html)
17
17
  - [Styleable via css and supports multiple piece sets](https://shaack.com/projekte/cm-chessboard/examples/different-styles.html)
18
18
  - Uses SVG for rendering
19
- - [Allows adding **extensions** to extend the functionality](https://shaack.com/projekte/cm-chessboard/examples/extensions/chessboard-arrows-extension.html)
19
+ - [Allows adding **extensions** to extend the functionality](https://shaack.com/projekte/cm-chessboard/examples/extensions/arrows-extension.html)
20
20
 
21
21
  ## Extensions
22
22
 
23
23
  The core of cm-chessboard is small, fast and reduced to the essentials. You can extend its functionality with extensions.
24
24
 
25
- - [Accessibility Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/chessboard-accessibility-extension.html) - makes the chessboard more accessible
26
- - [Arrows Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/chessboard-arrows-extension.html) - renders arrows on the chessboard
27
- - [Markers Extension](https://shaack.com/projekte/cm-chessboard/examples/input-callbacks.html) 🆕 - create markers on specific squares
28
- - [PromotionDialog Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/chessboard-promotion-dialog-extension.html) - shows a dialog to select the piece to promote to
29
- - [RenderVideo Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/chessboard-render-video-extension.html) 🆕 - renders a video from the pieces movement on the board
25
+ - [Accessibility Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/accessibility-extension.html) - makes the chessboard more accessible
26
+ - [Arrows Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/arrows-extension.html) - renders arrows on the chessboard
27
+ - [Markers Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/markers-extension.html) 🆕 - create markers on specific squares
28
+ - [PromotionDialog Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/promotion-dialog-extension.html) - shows a dialog to select the piece to promote to
29
+ - [RenderVideo Extension](https://shaack.com/projekte/cm-chessboard/examples/extensions/render-video-extension.html) 🆕 - renders a video from the pieces movement on the board
30
30
 
31
31
  ## Demo and repository
32
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "7.0.1",
3
+ "version": "7.0.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",
@@ -354,6 +354,9 @@ export class ChessboardView {
354
354
  squareTo: squareTo,
355
355
  piece: this.chessboard.getPiece(squareFrom)
356
356
  }
357
+ if (this.moveInputCallback) {
358
+ data.moveInputCallbackResult = this.moveInputCallback(data)
359
+ }
357
360
  this.chessboard.state.invokeExtensionPoints(EXTENSION_POINT.moveInput, data)
358
361
  }
359
362
 
@@ -366,7 +369,6 @@ export class ChessboardView {
366
369
  piece: this.chessboard.getPiece(squareFrom)
367
370
  }
368
371
  if (this.moveInputCallback) {
369
- // the "oldschool" move input validator
370
372
  data.moveInputCallbackResult = this.moveInputCallback(data)
371
373
  }
372
374
  // the new extension points