12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. var __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. })();
  11. (function (factory) {
  12. if (typeof module === "object" && typeof module.exports === "object") {
  13. var v = factory(require, exports);
  14. if (v !== undefined) module.exports = v;
  15. }
  16. else if (typeof define === "function" && define.amd) {
  17. define(["require", "exports", "../animations/animation"], factory);
  18. }
  19. })(function (require, exports) {
  20. "use strict";
  21. Object.defineProperty(exports, "__esModule", { value: true });
  22. var animation_1 = require("../animations/animation");
  23. /**
  24. * @hidden
  25. *
  26. * - play
  27. * - Add before classes - DOM WRITE
  28. * - Remove before classes - DOM WRITE
  29. * - Add before inline styles - DOM WRITE
  30. * - set inline FROM styles - DOM WRITE
  31. * - RAF
  32. * - read toolbar dimensions - DOM READ
  33. * - write content top/bottom padding - DOM WRITE
  34. * - set css transition duration/easing - DOM WRITE
  35. * - RAF
  36. * - set inline TO styles - DOM WRITE
  37. */
  38. var Transition = (function (_super) {
  39. __extends(Transition, _super);
  40. function Transition(plt, enteringView, leavingView, opts) {
  41. var _this = _super.call(this, plt, null, opts) || this;
  42. _this.enteringView = enteringView;
  43. _this.leavingView = leavingView;
  44. return _this;
  45. }
  46. Transition.prototype.init = function () { };
  47. Transition.prototype.registerStart = function (trnsStart) {
  48. this._trnsStart = trnsStart;
  49. };
  50. Transition.prototype.start = function () {
  51. this._trnsStart && this._trnsStart();
  52. this._trnsStart = null;
  53. // bubble up start
  54. this.parent && this.parent.start();
  55. };
  56. Transition.prototype.destroy = function () {
  57. _super.prototype.destroy.call(this);
  58. this.parent = this.enteringView = this.leavingView = this._trnsStart = null;
  59. };
  60. return Transition;
  61. }(animation_1.Animation));
  62. exports.Transition = Transition;
  63. });
  64. //# sourceMappingURL=transition.js.map