cm-chessboard 7.3.9 → 7.3.11
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
|
@@ -189,15 +189,13 @@ export class Chessboard {
|
|
|
189
189
|
|
|
190
190
|
destroy() {
|
|
191
191
|
this.state.invokeExtensionPoints(EXTENSION_POINT.destroy)
|
|
192
|
+
if(this.state.squareSelectEnabled) {
|
|
193
|
+
this.disableSquareSelect()
|
|
194
|
+
}
|
|
192
195
|
this.positionAnimationsQueue.destroy()
|
|
193
196
|
this.view.destroy()
|
|
194
197
|
this.view = undefined
|
|
195
198
|
this.state = undefined
|
|
196
|
-
if (this.squareSelectListener) {
|
|
197
|
-
this.context.removeEventListener("contextmenu", this.squareSelectListener)
|
|
198
|
-
this.context.removeEventListener("mouseup", this.squareSelectListener)
|
|
199
|
-
this.context.removeEventListener("touchend", this.squareSelectListener)
|
|
200
|
-
}
|
|
201
199
|
}
|
|
202
200
|
|
|
203
201
|
}
|
|
@@ -60,10 +60,6 @@ export class ChessboardView {
|
|
|
60
60
|
}
|
|
61
61
|
this.chessboard.context.removeEventListener("mousedown", this.pointerDownListener)
|
|
62
62
|
this.chessboard.context.removeEventListener("touchstart", this.pointerDownListener)
|
|
63
|
-
this.animationQueue = []
|
|
64
|
-
if (this.currentAnimation) {
|
|
65
|
-
cancelAnimationFrame(this.currentAnimation.frameHandle)
|
|
66
|
-
}
|
|
67
63
|
Svg.removeElement(this.svg)
|
|
68
64
|
}
|
|
69
65
|
|