mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-01 02:53:03 +08:00
refactor(accelerometer):
This commit is contained in:
parent
6e8248a0b8
commit
b7fb2483bf
@ -1,5 +1,6 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
import {Observable} from 'rxjs/Observable';
|
import { Observable } from 'rxjs/Observable';
|
||||||
|
|
||||||
|
|
||||||
export interface AccelerationData {
|
export interface AccelerationData {
|
||||||
|
|
||||||
@ -73,9 +74,7 @@ export class DeviceMotion {
|
|||||||
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
* @returns {Promise<any>} Returns object with x, y, z, and timestamp properties
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getCurrentAcceleration(): Promise<AccelerationData> {
|
static getCurrentAcceleration(): Promise<AccelerationData> { return; }
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
||||||
@ -87,7 +86,5 @@ export class DeviceMotion {
|
|||||||
observable: true,
|
observable: true,
|
||||||
clearFunction: 'clearWatch'
|
clearFunction: 'clearWatch'
|
||||||
})
|
})
|
||||||
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> {
|
static watchAcceleration(options?: AccelerometerOptions): Observable<AccelerationData> { return; }
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user