| 92341 | } |
| 92342 | // Tear down internal event management implementations. |
| 92343 | destroy() { |
| 92344 | if (this.element) { |
| 92345 | // wheelInput etc. are created in setElement() and therefore |
| 92346 | // cannot exist if there is no element |
| 92347 | this.wheelInput.destroy(); |
| 92348 | this.moveInput.destroy(); |
| 92349 | this.keyInput.destroy(); |
| 92350 | this.contextmenuInput.destroy(); |
| 92351 | this.manager.destroy(); |
| 92352 | this.wheelInput = null; |
| 92353 | this.moveInput = null; |
| 92354 | this.keyInput = null; |
| 92355 | this.contextmenuInput = null; |
| 92356 | this.manager = null; |
| 92357 | this.element = null; |
| 92358 | } |
| 92359 | } |
| 92360 | /** Register an event handler function to be called on `event` */ on(event, handler, opts) { |
| 92361 | this._addEventHandler(event, handler, opts, false); |
| 92362 | } |