UNPKG

1.68 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 PageTransition.prototype.init = function () {
22 var _this = this;
23 if (this.enteringView) {
24 this.enteringPage = new Animation(this.plt, this.enteringView.pageRef());
25 this.add(this.enteringPage.beforeAddClass('show-page'));
26 // Resize content before transition starts
27 this.beforeAddRead(function () {
28 _this.enteringView.readReady.emit();
29 });
30 this.beforeAddWrite(function () {
31 _this.enteringView.writeReady.emit();
32 });
33 }
34 };
35 PageTransition.prototype.destroy = function () {
36 _super.prototype.destroy.call(this);
37 this.enteringPage && this.enteringPage.destroy();
38 this.enteringPage = null;
39 };
40 return PageTransition;
41}(Transition));
42export { PageTransition };
43//# sourceMappingURL=page-transition.js.map
\No newline at end of file