cm-chessboard 8.1.0 → 8.1.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 +3 -1
- package/package.json +1 -1
- package/src/model/Extension.js +1 -1
- package/src/view/ChessboardView.js +2 -2
package/README.md
CHANGED
|
@@ -344,9 +344,11 @@ Currently possible extension points are defined in `Extension.js`.
|
|
|
344
344
|
export const EXTENSION_POINT = {
|
|
345
345
|
positionChanged: "positionChanged", // the positions of the pieces was changed
|
|
346
346
|
boardChanged: "boardChanged", // the board (orientation) was changed
|
|
347
|
+
boardResized: "boardResized", // the board was resized
|
|
347
348
|
moveInputToggled: "moveInputToggled", // move input was enabled or disabled
|
|
348
349
|
moveInput: "moveInput", // move started, moving over a square, validating or canceled
|
|
349
|
-
|
|
350
|
+
beforeRedrawBoard: "beforeRedrawBoard", // called before redrawing the board
|
|
351
|
+
afterRedrawBoard: "afterRedrawBoard", // called after redrawing the board
|
|
350
352
|
animation: "animation", // called on animation start, end and on every animation frame
|
|
351
353
|
destroy: "destroy" // called, before the board is destroyed
|
|
352
354
|
}
|
package/package.json
CHANGED
package/src/model/Extension.js
CHANGED
|
@@ -11,7 +11,7 @@ export const EXTENSION_POINT = {
|
|
|
11
11
|
moveInput: "moveInput", // move started, moving over a square, validating or canceled
|
|
12
12
|
beforeRedrawBoard: "beforeRedrawBoard", // called before redrawing the board
|
|
13
13
|
afterRedrawBoard: "afterRedrawBoard", // called after redrawing the board
|
|
14
|
-
redrawBoard: "redrawBoard", // called after redrawing the board, DEPRECATED, use afterRedrawBoard
|
|
14
|
+
redrawBoard: "redrawBoard", // called after redrawing the board, DEPRECATED, use afterRedrawBoard 2023-09-18
|
|
15
15
|
animation: "animation", // called on animation start, end and on every animation frame
|
|
16
16
|
destroy: "destroy" // called, before the board is destroyed
|
|
17
17
|
}
|
|
@@ -38,9 +38,9 @@ export class ChessboardView {
|
|
|
38
38
|
this.container.addEventListener("touchstart", this.pointerDownListener, {passive: false})
|
|
39
39
|
|
|
40
40
|
this.createSvgAndGroups()
|
|
41
|
-
this.updateMetrics()
|
|
41
|
+
// this.updateMetrics()
|
|
42
42
|
this.handleResize()
|
|
43
|
-
this.redrawBoard()
|
|
43
|
+
// this.redrawBoard()
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
pointerDownHandler(e) {
|