UNPKG

3.73 kBJavaScriptView Raw
1"use strict";
2var __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};
8var plugin_1 = require('./plugin');
9/**
10 * @name NativePageTransitions
11 * @description
12 * The Native Page Transitions plugin uses native hardware acceleration to animate your transitions between views. You have complete control over the type of transition, the duration, and direction.
13 *
14 * @usage
15 * ```
16 * import {NativePageTransitions, NativeTransitionOptions} from 'ionic-native';
17 *
18 * let options: NativeTransitionOptions = {
19 * direction: 'up',
20 * duration: 500,
21 * slowdownfactor: 3,
22 * slidePixels: 20,
23 * iosdelay: 100,
24 * androiddelay: 150,
25 * winphonedelay: 250,
26 * fixedPixelsTop: 0,
27 * fixedPixelsBottom: 60
28 * };
29 *
30 * NativePageTransitions.slide(options)
31 * .then(onSuccess)
32 * .catch(onError);
33 *
34 * ```
35 */
36var NativePageTransitions = (function () {
37 function NativePageTransitions() {
38 }
39 /**
40 * Perform a slide animation
41 * @param options {NativeTransitionOptions} Options for the transition
42 * @returns {Promise<any>}
43 */
44 NativePageTransitions.slide = function (options) { return; };
45 /**
46 * Perform a flip animation
47 * @param options {NativeTransitionOptions} Options for the transition
48 * @returns {Promise<any>}
49 */
50 NativePageTransitions.flip = function (options) { return; };
51 /**
52 * Perform a fade animation
53 * @param options {NativeTransitionOptions} Options for the transition
54 * @returns {Promise<any>}
55 */
56 NativePageTransitions.fade = function (options) { return; };
57 /**
58 * Perform a slide animation
59 * @param options {NativeTransitionOptions} Options for the transition
60 * @returns {Promise<any>}
61 */
62 NativePageTransitions.drawer = function (options) { return; };
63 /**
64 * Perform a slide animation
65 * @param options {NativeTransitionOptions} Options for the transition
66 * @returns {Promise<any>}
67 */
68 NativePageTransitions.curl = function (options) { return; };
69 __decorate([
70 plugin_1.Cordova()
71 ], NativePageTransitions, "slide", null);
72 __decorate([
73 plugin_1.Cordova()
74 ], NativePageTransitions, "flip", null);
75 __decorate([
76 plugin_1.Cordova({ platforms: ['iOS', 'Android'] })
77 ], NativePageTransitions, "fade", null);
78 __decorate([
79 plugin_1.Cordova({ platforms: ['iOS', 'Android'] })
80 ], NativePageTransitions, "drawer", null);
81 __decorate([
82 plugin_1.Cordova({ platforms: ['iOS'] })
83 ], NativePageTransitions, "curl", null);
84 NativePageTransitions = __decorate([
85 plugin_1.Plugin({
86 pluginName: 'NativePageTransitions',
87 plugin: 'com.telerik.plugins.nativepagetransitions',
88 pluginRef: 'plugins.nativepagetransitions',
89 repo: 'https://github.com/Telerik-Verified-Plugins/NativePageTransitions',
90 platforms: ['iOS', 'Android', 'Windows Phone']
91 })
92 ], NativePageTransitions);
93 return NativePageTransitions;
94}());
95exports.NativePageTransitions = NativePageTransitions;
96//# sourceMappingURL=native-page-transitions.js.map
\No newline at end of file