mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-17 00:51:07 +08:00
update device orientation docs to reflect renaming of CompassHeading interface (#1107)
This commit is contained in:
parent
5ef669ae91
commit
407659a3ef
@ -46,19 +46,19 @@ export interface DeviceOrientationCompassOptions {
|
|||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```typescript
|
* ```typescript
|
||||||
* // CompassHeading is an interface for compass
|
* // DeviceOrientationCompassHeading is an interface for compass
|
||||||
* import { DeviceOrientation, CompassHeading } from 'ionic-native';
|
* import { DeviceOrientation, DeviceOrientationCompassHeading } from 'ionic-native';
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* // Get the device current compass heading
|
* // Get the device current compass heading
|
||||||
* DeviceOrientation.getCurrentHeading().then(
|
* DeviceOrientation.getCurrentHeading().then(
|
||||||
* (data: CompassHeading) => console.log(data),
|
* (data: DeviceOrientationCompassHeading) => console.log(data),
|
||||||
* (error: any) => console.log(error)
|
* (error: any) => console.log(error)
|
||||||
* );
|
* );
|
||||||
*
|
*
|
||||||
* // Watch the device compass heading change
|
* // Watch the device compass heading change
|
||||||
* var subscription = DeviceOrientation.watchHeading().subscribe(
|
* var subscription = DeviceOrientation.watchHeading().subscribe(
|
||||||
* (data: CompassHeading) => console.log(data)
|
* (data: DeviceOrientationCompassHeading) => console.log(data)
|
||||||
* );
|
* );
|
||||||
*
|
*
|
||||||
* // Stop watching heading change
|
* // Stop watching heading change
|
||||||
|
Loading…
x
Reference in New Issue
Block a user