a zip code crypto-currency system good for red ONLY

transition-wp.js 3.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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", "../util/util", "./page-transition"], factory);
  18. }
  19. })(function (require, exports) {
  20. "use strict";
  21. Object.defineProperty(exports, "__esModule", { value: true });
  22. var animation_1 = require("../animations/animation");
  23. var util_1 = require("../util/util");
  24. var page_transition_1 = require("./page-transition");
  25. var SHOW_BACK_BTN_CSS = 'show-back-button';
  26. var SCALE_SMALL = .95;
  27. var WPTransition = (function (_super) {
  28. __extends(WPTransition, _super);
  29. function WPTransition() {
  30. return _super !== null && _super.apply(this, arguments) || this;
  31. }
  32. WPTransition.prototype.init = function () {
  33. _super.prototype.init.call(this);
  34. var plt = this.plt;
  35. var enteringView = this.enteringView;
  36. var leavingView = this.leavingView;
  37. var opts = this.opts;
  38. // what direction is the transition going
  39. var backDirection = (opts.direction === 'back');
  40. if (enteringView) {
  41. if (backDirection) {
  42. this.duration(util_1.isPresent(opts.duration) ? opts.duration : 120).easing('cubic-bezier(0.47,0,0.745,0.715)');
  43. this.enteringPage.beforeClearStyles(['scale']);
  44. }
  45. else {
  46. this.duration(util_1.isPresent(opts.duration) ? opts.duration : 280).easing('cubic-bezier(0,0,0.05,1)');
  47. this.enteringPage
  48. .fromTo('scale', SCALE_SMALL, 1, true)
  49. .fromTo('opacity', 0.01, 1, true);
  50. }
  51. if (enteringView.hasNavbar()) {
  52. var enteringPageEle = enteringView.pageRef().nativeElement;
  53. var enteringNavbarEle = enteringPageEle.querySelector('ion-navbar');
  54. var enteringNavBar = new animation_1.Animation(plt, enteringNavbarEle);
  55. this.add(enteringNavBar);
  56. var enteringBackButton = new animation_1.Animation(plt, enteringNavbarEle.querySelector('.back-button'));
  57. this.add(enteringBackButton);
  58. if (enteringView.enableBack()) {
  59. enteringBackButton.beforeAddClass(SHOW_BACK_BTN_CSS);
  60. }
  61. else {
  62. enteringBackButton.beforeRemoveClass(SHOW_BACK_BTN_CSS);
  63. }
  64. }
  65. }
  66. // setup leaving view
  67. if (leavingView && backDirection) {
  68. // leaving content
  69. this.duration(opts.duration || 200).easing('cubic-bezier(0.47,0,0.745,0.715)');
  70. var leavingPage = new animation_1.Animation(plt, leavingView.pageRef());
  71. this.add(leavingPage.fromTo('scale', 1, SCALE_SMALL).fromTo('opacity', 0.99, 0));
  72. }
  73. };
  74. return WPTransition;
  75. }(page_transition_1.PageTransition));
  76. exports.WPTransition = WPTransition;
  77. });
  78. //# sourceMappingURL=transition-wp.js.map