Fixed input remove listener. Run tsfmt.

This commit is contained in:
Davide Tantillo 2024-09-30 11:52:02 +02:00
parent 2db1873fd5
commit 95f2119e46
3 changed files with 1101 additions and 1101 deletions

View File

@ -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;
} }