UI for Zipcoin Blue

picker-transitions.js 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. import { Animation } from '../../animations/animation';
  12. import { Transition } from '../../transitions/transition';
  13. /**
  14. * Animations for pickers
  15. */
  16. var PickerSlideIn = (function (_super) {
  17. __extends(PickerSlideIn, _super);
  18. function PickerSlideIn() {
  19. return _super !== null && _super.apply(this, arguments) || this;
  20. }
  21. PickerSlideIn.prototype.init = function () {
  22. var ele = this.enteringView.pageRef().nativeElement;
  23. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  24. var wrapper = new Animation(this.plt, ele.querySelector('.picker-wrapper'));
  25. backdrop.fromTo('opacity', 0.01, 0.26);
  26. wrapper.fromTo('translateY', '100%', '0%');
  27. this.easing('cubic-bezier(.36,.66,.04,1)').duration(400).add(backdrop).add(wrapper);
  28. };
  29. return PickerSlideIn;
  30. }(Transition));
  31. export { PickerSlideIn };
  32. var PickerSlideOut = (function (_super) {
  33. __extends(PickerSlideOut, _super);
  34. function PickerSlideOut() {
  35. return _super !== null && _super.apply(this, arguments) || this;
  36. }
  37. PickerSlideOut.prototype.init = function () {
  38. var ele = this.leavingView.pageRef().nativeElement;
  39. var backdrop = new Animation(this.plt, ele.querySelector('ion-backdrop'));
  40. var wrapper = new Animation(this.plt, ele.querySelector('.picker-wrapper'));
  41. backdrop.fromTo('opacity', 0.26, 0);
  42. wrapper.fromTo('translateY', '0%', '100%');
  43. this.easing('cubic-bezier(.36,.66,.04,1)').duration(450).add(backdrop).add(wrapper);
  44. };
  45. return PickerSlideOut;
  46. }(Transition));
  47. export { PickerSlideOut };
  48. //# sourceMappingURL=picker-transitions.js.map