UNPKG

1.89 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';
12/**
13 * @hidden
14 *
15 * - play
16 * - Add before classes - DOM WRITE
17 * - Remove before classes - DOM WRITE
18 * - Add before inline styles - DOM WRITE
19 * - set inline FROM styles - DOM WRITE
20 * - RAF
21 * - read toolbar dimensions - DOM READ
22 * - write content top/bottom padding - DOM WRITE
23 * - set css transition duration/easing - DOM WRITE
24 * - RAF
25 * - set inline TO styles - DOM WRITE
26 */
27var Transition = (function (_super) {
28 __extends(Transition, _super);
29 function Transition(plt, enteringView, leavingView, opts) {
30 var _this = _super.call(this, plt, null, opts) || this;
31 _this.enteringView = enteringView;
32 _this.leavingView = leavingView;
33 return _this;
34 }
35 Transition.prototype.init = function () { };
36 Transition.prototype.registerStart = function (trnsStart) {
37 this._trnsStart = trnsStart;
38 };
39 Transition.prototype.start = function () {
40 this._trnsStart && this._trnsStart();
41 this._trnsStart = null;
42 // bubble up start
43 this.parent && this.parent.start();
44 };
45 Transition.prototype.destroy = function () {
46 _super.prototype.destroy.call(this);
47 this.parent = this.enteringView = this.leavingView = this._trnsStart = null;
48 };
49 return Transition;
50}(Animation));
51export { Transition };
52//# sourceMappingURL=transition.js.map
\No newline at end of file