mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
Fixed input remove listener. Run tsfmt.
This commit is contained in:
parent
2db1873fd5
commit
95f2119e46
@ -214,14 +214,14 @@ export class Input implements Disposable {
|
|||||||
|
|
||||||
dispose (): void {
|
dispose (): void {
|
||||||
const element = this.element;
|
const element = this.element;
|
||||||
element.addEventListener("mousedown", this.callbacks.mouseDown, true);
|
element.removeEventListener("mousedown", this.callbacks.mouseDown, true);
|
||||||
element.addEventListener("mousemove", this.callbacks.mouseMove, true);
|
element.removeEventListener("mousemove", this.callbacks.mouseMove, true);
|
||||||
element.addEventListener("mouseup", this.callbacks.mouseUp, true);
|
element.removeEventListener("mouseup", this.callbacks.mouseUp, true);
|
||||||
element.addEventListener("wheel", this.callbacks.mouseWheel, true);
|
element.removeEventListener("wheel", this.callbacks.mouseWheel, true);
|
||||||
element.addEventListener("touchstart", this.callbacks.touchStart, { passive: false, capture: false });
|
element.removeEventListener("touchstart", this.callbacks.touchStart, { capture: false });
|
||||||
element.addEventListener("touchmove", this.callbacks.touchMove, { passive: false, capture: false });
|
element.removeEventListener("touchmove", this.callbacks.touchMove, { capture: false });
|
||||||
element.addEventListener("touchend", this.callbacks.touchEnd, { passive: false, capture: false });
|
element.removeEventListener("touchend", this.callbacks.touchEnd, { capture: false });
|
||||||
element.addEventListener("touchcancel", this.callbacks.touchEnd);
|
element.removeEventListener("touchcancel", this.callbacks.touchEnd);
|
||||||
this.listeners.length = 0;
|
this.listeners.length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user