Merge branch 'master' into v5

This commit is contained in:
Daniel
2018-09-17 18:23:18 +02:00
parent 46b1a7385c
commit 039c6d40af
76 changed files with 846 additions and 494 deletions
+6 -8
View File
@@ -88,14 +88,12 @@ export class Gyroscope extends IonicNativePlugin {
* @return {Observable<GyroscopeOrientation>} Returns an Observable that resolves GyroscopeOrientation
*/
watch(options?: GyroscopeOptions): Observable<GyroscopeOrientation> {
return new Observable<GyroscopeOrientation>((observer: any) => {
const watchId = navigator.gyroscope.watch(
observer.next.bind(observer),
observer.next.bind(observer),
options
);
return () => navigator.gyroscope.clearWatch(watchId);
});
return new Observable<GyroscopeOrientation>(
(observer: any) => {
const watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
return () => navigator.gyroscope.clearWatch(watchId);
}
);
}
/**