UNPKG

1.87 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 './transition';
13/**
14 * @hidden
15 */
16var PageTransition = (function (_super) {
17 __extends(PageTransition, _super);
18 function PageTransition() {
19 return _super !== null && _super.apply(this, arguments) || this;
20 }
21 /**
22 * @return {?}
23 */
24 PageTransition.prototype.init = function () {
25 var _this = this;
26 if (this.enteringView) {
27 this.enteringPage = new Animation(this.plt, this.enteringView.pageRef());
28 this.add(this.enteringPage.beforeAddClass('show-page'));
29 // Resize content before transition starts
30 this.beforeAddRead(function () {
31 _this.enteringView.readReady.emit();
32 });
33 this.beforeAddWrite(function () {
34 _this.enteringView.writeReady.emit();
35 });
36 }
37 };
38 /**
39 * @return {?}
40 */
41 PageTransition.prototype.destroy = function () {
42 _super.prototype.destroy.call(this);
43 this.enteringPage && this.enteringPage.destroy();
44 this.enteringPage = null;
45 };
46 return PageTransition;
47}(Transition));
48export { PageTransition };
49function PageTransition_tsickle_Closure_declarations() {
50 /** @type {?} */
51 PageTransition.prototype.enteringPage;
52}
53//# sourceMappingURL=page-transition.js.map
\No newline at end of file