From a7b4e096433258ceb0bcae0ebccaf74071e22bd1 Mon Sep 17 00:00:00 2001 From: myh6666 <33438314+myh6666@users.noreply.github.com> Date: Mon, 18 Feb 2019 17:55:54 +0800 Subject: [PATCH] fix(module:tree): word misspelling(destory -> destroy) (#2914) --- components/tree/nz-tree-node.component.ts | 24 +++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/components/tree/nz-tree-node.component.ts b/components/tree/nz-tree-node.component.ts index 3a12503d239..f34998302be 100644 --- a/components/tree/nz-tree-node.component.ts +++ b/components/tree/nz-tree-node.component.ts @@ -160,7 +160,7 @@ export class NzTreeNodeComponent implements OnInit, OnChanges, OnDestroy { /** * drag var */ - destory$ = new Subject(); + destroy$ = new Subject(); dragPos = 2; dragPosClass: object = { '0' : 'drag-over', @@ -411,16 +411,16 @@ export class NzTreeNodeComponent implements OnInit, OnChanges, OnDestroy { handDragEvent(): void { this.ngZone.runOutsideAngular(() => { if (this.nzDraggable) { - this.destory$ = new Subject(); - fromEvent(this.elRef.nativeElement, 'dragstart').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragStart(e)); - fromEvent(this.elRef.nativeElement, 'dragenter').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragEnter(e)); - fromEvent(this.elRef.nativeElement, 'dragover').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragOver(e)); - fromEvent(this.elRef.nativeElement, 'dragleave').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragLeave(e)); - fromEvent(this.elRef.nativeElement, 'drop').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragDrop(e)); - fromEvent(this.elRef.nativeElement, 'dragend').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragEnd(e)); + this.destroy$ = new Subject(); + fromEvent(this.elRef.nativeElement, 'dragstart').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragStart(e)); + fromEvent(this.elRef.nativeElement, 'dragenter').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragEnter(e)); + fromEvent(this.elRef.nativeElement, 'dragover').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragOver(e)); + fromEvent(this.elRef.nativeElement, 'dragleave').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragLeave(e)); + fromEvent(this.elRef.nativeElement, 'drop').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragDrop(e)); + fromEvent(this.elRef.nativeElement, 'dragend').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragEnd(e)); } else { - this.destory$.next(); - this.destory$.complete(); + this.destroy$.next(); + this.destroy$.complete(); } }); } @@ -437,7 +437,7 @@ export class NzTreeNodeComponent implements OnInit, OnChanges, OnDestroy { } ngOnDestroy(): void { - this.destory$.next(); - this.destory$.complete(); + this.destroy$.next(); + this.destroy$.complete(); } }