* disable * Unbind event handlers
()
| 90 | * Unbind event handlers |
| 91 | */ |
| 92 | disable() { |
| 93 | if (!this._enabled) return; |
| 94 | |
| 95 | this._enabled = false; |
| 96 | this._multiSelection.clear(); |
| 97 | this._spaceClickDisabled = false; |
| 98 | this._longPressTimeout = null; |
| 99 | this._showsMenu = false; |
| 100 | this._showsMapRouletteMenu = false; |
| 101 | |
| 102 | this.lastDown = null; |
| 103 | this.lastUp = null; |
| 104 | this.lastMove = null; |
| 105 | this.lastSpace = null; |
| 106 | this.lastClick = null; |
| 107 | |
| 108 | this._cancelLongPress(); |
| 109 | |
| 110 | const eventManager = this.context.systems.gfx.events; |
| 111 | eventManager.off('keydown', this._keydown); |
| 112 | eventManager.off('keyup', this._keyup); |
| 113 | eventManager.off('pointerdown', this._pointerdown); |
| 114 | eventManager.off('pointermove', this._pointermove); |
| 115 | eventManager.off('pointerup', this._pointerup); |
| 116 | eventManager.off('pointercancel', this._pointercancel); |
| 117 | } |
| 118 | |
| 119 | |
| 120 | /** |
nothing calls this directly
no test coverage detected