Removes the dragging functionality from the DOM element.
()
| 536 | |
| 537 | /** Removes the dragging functionality from the DOM element. */ |
| 538 | dispose() { |
| 539 | this._removeRootElementListeners(); |
| 540 | |
| 541 | // Do this check before removing from the registry since it'll |
| 542 | // stop being considered as dragged once it is removed. |
| 543 | if (this.isDragging()) { |
| 544 | // Since we move out the element to the end of the body while it's being |
| 545 | // dragged, we have to make sure that it's removed if it gets destroyed. |
| 546 | this._rootElement?.remove(); |
| 547 | } |
| 548 | |
| 549 | this._marker?.remove(); |
| 550 | this._destroyPreview(); |
| 551 | this._destroyPlaceholder(); |
| 552 | this._dragDropRegistry.removeDragItem(this); |
| 553 | this._removeListeners(); |
| 554 | this.beforeStarted.complete(); |
| 555 | this.started.complete(); |
| 556 | this.released.complete(); |
| 557 | this.ended.complete(); |
| 558 | this.entered.complete(); |
| 559 | this.exited.complete(); |
| 560 | this.dropped.complete(); |
| 561 | this._moveEvents.complete(); |
| 562 | this._handles = []; |
| 563 | this._disabledHandles.clear(); |
| 564 | this._dropContainer = undefined; |
| 565 | this._resizeSubscription.unsubscribe(); |
| 566 | this._parentPositions.clear(); |
| 567 | this._boundaryElement = |
| 568 | this._rootElement = |
| 569 | this._ownerSVGElement = |
| 570 | this._placeholderTemplate = |
| 571 | this._previewTemplate = |
| 572 | this._marker = |
| 573 | this._parentDragRef = |
| 574 | null!; |
| 575 | } |
| 576 | |
| 577 | /** Checks whether the element is currently being dragged. */ |
| 578 | isDragging(): boolean { |
nothing calls this directly
no test coverage detected