-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(grid): DragStarted event emitter to always emit inside the zone (#3…
…). fix(grid-item): dragStart$ to be always outside the zone on mouse/touch move events.
- Loading branch information
1 parent
a069890
commit 51d7d76
Showing
5 changed files
with
134 additions
and
39 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { NgZone } from '@angular/core'; | ||
import { Observable, Subscription } from 'rxjs'; | ||
import { filter } from 'rxjs/operators'; | ||
|
||
/** Runs source observable outside the zone */ | ||
export function ktdOutsideZone<T>(zone: NgZone) { | ||
return (source: Observable<T>) => { | ||
return new Observable<T>(observer => { | ||
return zone.runOutsideAngular<Subscription>(() => source.subscribe(observer)); | ||
}); | ||
}; | ||
} | ||
|
||
|
||
/** Rxjs operator that makes source observable to no emit any data */ | ||
export function ktdNoEmit() { | ||
return (source$: Observable<any>): Observable<any> => { | ||
return source$.pipe(filter(() => false)); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters