cm-chessboard 8.5.0 → 8.5.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "8.5.0",
3
+ "version": "8.5.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",
@@ -179,7 +179,7 @@ export class PromotionDialog extends Extension {
179
179
  this.state.displayState = displayState
180
180
  if (displayState === DISPLAY_STATE.shown) {
181
181
  this.clickDelegate = Utils.delegate(this.chessboard.view.svg,
182
- "mousedown",
182
+ "pointerdown",
183
183
  "*",
184
184
  this.promotionDialogOnClickPiece.bind(this))
185
185
  this.contextMenuListener = this.contextMenu.bind(this)
@@ -57,6 +57,7 @@ export class ChessboardView {
57
57
  this.chessboard.context.removeEventListener("mousedown", this.pointerDownListener)
58
58
  this.chessboard.context.removeEventListener("touchstart", this.pointerDownListener)
59
59
  Svg.removeElement(this.svg)
60
+ this.container.remove()
60
61
  }
61
62
 
62
63
  // Sprite //
@@ -88,6 +89,7 @@ export class ChessboardView {
88
89
  this.svg.setAttribute("class", "cm-chessboard border-type-" + this.chessboard.props.style.borderType + " " + cssClass)
89
90
  // this.svg.setAttribute("aria-describedby", "svg-description")
90
91
  this.svg.setAttribute("role", "img")
92
+ this.svg.setAttribute("style", "position: relative; top: -0.5px") // fix 1px offset
91
93
  this.updateMetrics()
92
94
  this.boardGroup = Svg.addElement(this.svg, "g", {class: "board"})
93
95
  this.coordinatesGroup = Svg.addElement(this.svg, "g", {class: "coordinates", "aria-hidden": "true"})