1 | "use strict";
|
2 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6 | return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7 | };
|
8 | var plugin_1 = require('./plugin');
|
9 | var Observable_1 = require('rxjs/Observable');
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 | var Gyroscope = (function () {
|
37 | function Gyroscope() {
|
38 | }
|
39 | |
40 |
|
41 |
|
42 |
|
43 |
|
44 | Gyroscope.watch = function (options) {
|
45 | return new Observable_1.Observable(function (observer) {
|
46 | var watchId = navigator.gyroscope.watch(observer.next.bind(observer), observer.next.bind(observer), options);
|
47 | return function () { return navigator.gyroscope.clearWatch(watchId); };
|
48 | });
|
49 | };
|
50 | |
51 |
|
52 |
|
53 |
|
54 |
|
55 | Gyroscope.getCurrent = function (options) { return; };
|
56 | __decorate([
|
57 | plugin_1.Cordova({
|
58 | callbackOrder: 'reverse'
|
59 | })
|
60 | ], Gyroscope, "getCurrent", null);
|
61 | Gyroscope = __decorate([
|
62 | plugin_1.Plugin({
|
63 | pluginName: 'Gyroscope',
|
64 | plugin: 'cordova-plugin-gyroscope',
|
65 | pluginRef: 'navigator.gyroscope',
|
66 | repo: 'https://github.com/NeoLSN/cordova-plugin-gyroscope',
|
67 | platforms: ['Android', 'iOS']
|
68 | })
|
69 | ], Gyroscope);
|
70 | return Gyroscope;
|
71 | }());
|
72 | exports.Gyroscope = Gyroscope;
|
73 |
|
\ | No newline at end of file |