cm-chessboard 5.1.0 → 5.1.1

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.
Files changed (2) hide show
  1. package/README.md +5 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -283,7 +283,7 @@ Example: The markerCircle is defined in the SVG like this.
283
283
  It's a circle with the radius 18 and its center at 20/20.
284
284
 
285
285
  Important is the id "markerCircle". You can set the marker
286
- with `board.addMarker("e4", {class: "markerSquare", slice: "markerSquare"})`
286
+ with `board.addMarker({class: "markerSquare", slice: "markerSquare"}, "e4")`
287
287
  "emphasize" is the css class, which defines the color and opacity of the marker. "slice" is the id of the marker in the
288
288
  SVG. This is
289
289
  also demonstrated in the [mark squares example](https://shaack.com/projekte/cm-chessboard/examples/input-callbacks.html)
@@ -310,18 +310,18 @@ marker.markerCircleRed {
310
310
  So you can simply add a marker with the id `myMarkerIdInSvg` to the SVG, and add the class `myMarkerCssClass` to the
311
311
  css. Then you can show it on the field "e4" with
312
312
 
313
- `addMarker("e4", {class: "myMarkerCssClass", slice: "myMarkerIdInSvg"})`
313
+ `addMarker({class: "myMarkerCssClass", slice: "myMarkerIdInSvg"}, "e4")`
314
314
 
315
315
  To allow easy removing of the marker, you have to define the marker type in your code.
316
316
 
317
317
  ```js
318
318
  const myMarkerType = {class: "myMarkerCssClass", slice: "myMarkerIdInSvg"}
319
319
  // add
320
- chessboard.addMarker("e4", myMarkerType)
320
+ chessboard.addMarker(myMarkerType, "e4")
321
321
  // remove
322
- chessboard.removeMarkers("e4", myMarkerType)
322
+ chessboard.removeMarkers(myMarkerType, "e4")
323
323
  // remove all "myMarkerType"
324
- chessboard.removeMarkers(undefined, myMarkerType)
324
+ chessboard.removeMarkers(myMarkerType, undefined)
325
325
  ```
326
326
 
327
327
  ## Extensions
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "A JavaScript chessboard which is lightweight, ES6 module based, responsive, SVG rendered and without dependencies.",
5
5
  "keywords": [
6
6
  "chess",