Skip to content

Commit

Permalink
fix(module:tree): word misspelling(destory -> destroy) (#2914)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuhuiM authored and vthinkxie committed Feb 18, 2019
1 parent 6dd3cbf commit a7b4e09
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions components/tree/nz-tree-node.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -411,16 +411,16 @@ export class NzTreeNodeComponent implements OnInit, OnChanges, OnDestroy {
handDragEvent(): void {
this.ngZone.runOutsideAngular(() => {
if (this.nzDraggable) {
this.destory$ = new Subject();
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragstart').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragStart(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragenter').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragEnter(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragover').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragOver(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragleave').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragLeave(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'drop').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragDrop(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragend').pipe(takeUntil(this.destory$)).subscribe((e: DragEvent) => this.handleDragEnd(e));
this.destroy$ = new Subject();
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragstart').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragStart(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragenter').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragEnter(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragover').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragOver(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'dragleave').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragLeave(e));
fromEvent<DragEvent>(this.elRef.nativeElement, 'drop').pipe(takeUntil(this.destroy$)).subscribe((e: DragEvent) => this.handleDragDrop(e));
fromEvent<DragEvent>(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();
}
});
}
Expand All @@ -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();
}
}

0 comments on commit a7b4e09

Please sign in to comment.