* Cleanup resources
()
| 372 | * Cleanup resources |
| 373 | */ |
| 374 | dispose(): void { |
| 375 | this.selectionChangedEmitter.dispose(); |
| 376 | |
| 377 | // Stop auto-scroll if active |
| 378 | this.stopAutoScroll(); |
| 379 | |
| 380 | // Clean up document event listener |
| 381 | if (this.boundMouseUpHandler) { |
| 382 | document.removeEventListener('mouseup', this.boundMouseUpHandler); |
| 383 | this.boundMouseUpHandler = null; |
| 384 | } |
| 385 | |
| 386 | // Clean up document mousemove listener |
| 387 | if (this.boundDocumentMouseMoveHandler) { |
| 388 | document.removeEventListener('mousemove', this.boundDocumentMouseMoveHandler); |
| 389 | this.boundDocumentMouseMoveHandler = null; |
| 390 | } |
| 391 | |
| 392 | // Clean up context menu event listener |
| 393 | if (this.boundContextMenuHandler) { |
| 394 | const canvas = this.renderer.getCanvas(); |
| 395 | canvas.removeEventListener('contextmenu', this.boundContextMenuHandler); |
| 396 | this.boundContextMenuHandler = null; |
| 397 | } |
| 398 | |
| 399 | // Clean up document click listener |
| 400 | if (this.boundClickHandler) { |
| 401 | document.removeEventListener('click', this.boundClickHandler); |
| 402 | this.boundClickHandler = null; |
| 403 | } |
| 404 | |
| 405 | // Canvas event listeners will be cleaned up when canvas is removed from DOM |
| 406 | } |
| 407 | |
| 408 | // ========================================================================== |
| 409 | // Private Methods |
nothing calls this directly
no test coverage detected