UNPKG

5.44 kBJavaScriptView Raw
1var __extends = (this && this.__extends) || (function () {
2 var extendStatics = Object.setPrototypeOf ||
3 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
4 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5 return function (d, b) {
6 extendStatics(d, b);
7 function __() { this.constructor = d; }
8 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9 };
10})();
11import { Animation } from '../../animations/animation';
12import { Transition } from '../../transitions/transition';
13/**
14 * Animations for loading
15 */
16var LoadingPopIn = (function (_super) {
17 __extends(LoadingPopIn, _super);
18 function LoadingPopIn() {
19 return _super !== null && _super.apply(this, arguments) || this;
20 }
21 LoadingPopIn.prototype.init = function () {
22 var ele = this.enteringView.pageRef().nativeElement;
23 var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
24 var wrapper = new Animation(this.plt, ele.querySelector('.loading-wrapper'));
25 wrapper.fromTo('opacity', 0.01, 1).fromTo('scale', 1.1, 1);
26 backdrop.fromTo('opacity', 0.01, 0.3);
27 this
28 .easing('ease-in-out')
29 .duration(200)
30 .add(backdrop)
31 .add(wrapper);
32 };
33 return LoadingPopIn;
34}(Transition));
35export { LoadingPopIn };
36var LoadingPopOut = (function (_super) {
37 __extends(LoadingPopOut, _super);
38 function LoadingPopOut() {
39 return _super !== null && _super.apply(this, arguments) || this;
40 }
41 LoadingPopOut.prototype.init = function () {
42 var ele = this.leavingView.pageRef().nativeElement;
43 var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
44 var wrapper = new Animation(this.plt, ele.querySelector('.loading-wrapper'));
45 wrapper.fromTo('opacity', 0.99, 0).fromTo('scale', 1, 0.9);
46 backdrop.fromTo('opacity', 0.3, 0);
47 this
48 .easing('ease-in-out')
49 .duration(200)
50 .add(backdrop)
51 .add(wrapper);
52 };
53 return LoadingPopOut;
54}(Transition));
55export { LoadingPopOut };
56var LoadingMdPopIn = (function (_super) {
57 __extends(LoadingMdPopIn, _super);
58 function LoadingMdPopIn() {
59 return _super !== null && _super.apply(this, arguments) || this;
60 }
61 LoadingMdPopIn.prototype.init = function () {
62 var ele = this.enteringView.pageRef().nativeElement;
63 var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
64 var wrapper = new Animation(this.plt, ele.querySelector('.loading-wrapper'));
65 wrapper.fromTo('opacity', 0.01, 1).fromTo('scale', 1.1, 1);
66 backdrop.fromTo('opacity', 0.01, 0.5);
67 this
68 .easing('ease-in-out')
69 .duration(200)
70 .add(backdrop)
71 .add(wrapper);
72 };
73 return LoadingMdPopIn;
74}(Transition));
75export { LoadingMdPopIn };
76var LoadingMdPopOut = (function (_super) {
77 __extends(LoadingMdPopOut, _super);
78 function LoadingMdPopOut() {
79 return _super !== null && _super.apply(this, arguments) || this;
80 }
81 LoadingMdPopOut.prototype.init = function () {
82 var ele = this.leavingView.pageRef().nativeElement;
83 var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
84 var wrapper = new Animation(this.plt, ele.querySelector('.loading-wrapper'));
85 wrapper.fromTo('opacity', 0.99, 0).fromTo('scale', 1, 0.9);
86 backdrop.fromTo('opacity', 0.5, 0);
87 this
88 .easing('ease-in-out')
89 .duration(200)
90 .add(backdrop)
91 .add(wrapper);
92 };
93 return LoadingMdPopOut;
94}(Transition));
95export { LoadingMdPopOut };
96var LoadingWpPopIn = (function (_super) {
97 __extends(LoadingWpPopIn, _super);
98 function LoadingWpPopIn() {
99 return _super !== null && _super.apply(this, arguments) || this;
100 }
101 LoadingWpPopIn.prototype.init = function () {
102 var ele = this.enteringView.pageRef().nativeElement;
103 var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
104 var wrapper = new Animation(this.plt, ele.querySelector('.loading-wrapper'));
105 wrapper.fromTo('opacity', 0.01, 1).fromTo('scale', 1.3, 1);
106 backdrop.fromTo('opacity', 0.01, 0.16);
107 this
108 .easing('cubic-bezier(0,0,0.05,1)')
109 .duration(200)
110 .add(backdrop)
111 .add(wrapper);
112 };
113 return LoadingWpPopIn;
114}(Transition));
115export { LoadingWpPopIn };
116var LoadingWpPopOut = (function (_super) {
117 __extends(LoadingWpPopOut, _super);
118 function LoadingWpPopOut() {
119 return _super !== null && _super.apply(this, arguments) || this;
120 }
121 LoadingWpPopOut.prototype.init = function () {
122 var ele = this.leavingView.pageRef().nativeElement;
123 var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
124 var wrapper = new Animation(this.plt, ele.querySelector('.loading-wrapper'));
125 wrapper.fromTo('opacity', 0.99, 0).fromTo('scale', 1, 1.3);
126 backdrop.fromTo('opacity', 0.16, 0);
127 this
128 .easing('ease-out')
129 .duration(150)
130 .add(backdrop)
131 .add(wrapper);
132 };
133 return LoadingWpPopOut;
134}(Transition));
135export { LoadingWpPopOut };
136//# sourceMappingURL=loading-transitions.js.map
\No newline at end of file