mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
docs(deviceMotion): update docs
This commit is contained in:
parent
d84b83b42c
commit
4a38c02c14
@ -70,7 +70,6 @@ export class DeviceMotion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current acceleration along the x, y, and z axes.
|
* Get the current acceleration along the x, y, and z axes.
|
||||||
*
|
|
||||||
* @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()
|
||||||
@ -80,18 +79,8 @@ export class DeviceMotion {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
* Watch the device acceleration. Clear the watch by unsubscribing from the observable.
|
||||||
*
|
* @param {AccelerometerOptions} options list of options for the accelerometer.
|
||||||
* ```ts
|
* @returns {Observable<AccelerationData>} Observable returns an observable that you can subscribe to
|
||||||
* // Watch device acceleration
|
|
||||||
* var subscription = DeviceMotion.watchPosition().subscribe(acceleration => {
|
|
||||||
* console.log(acceleration);
|
|
||||||
* });
|
|
||||||
*
|
|
||||||
* // Stop watch
|
|
||||||
* subscription.unsubscribe();
|
|
||||||
* ```
|
|
||||||
* @param options
|
|
||||||
* @returns {Observable<AccelerationData>}
|
|
||||||
*/
|
*/
|
||||||
@Cordova({
|
@Cordova({
|
||||||
callbackOrder: 'reverse',
|
callbackOrder: 'reverse',
|
||||||
|
Loading…
Reference in New Issue
Block a user