版博士V2.0程序
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

67 行
1.7 KiB

  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. const Event_1 = __importDefault(require("./Event"));
  7. /**
  8. *
  9. */
  10. class UIEvent extends Event_1.default {
  11. /**
  12. * Constructor.
  13. *
  14. * @param type Event type.
  15. * @param [eventInit] Event init.
  16. */
  17. constructor(type, eventInit = null) {
  18. super(type, eventInit);
  19. this.detail = 0;
  20. this.layerX = 0;
  21. this.layerY = 0;
  22. this.pageX = 0;
  23. this.pageY = 0;
  24. this.view = null;
  25. if (eventInit) {
  26. this.detail = eventInit.detail !== undefined ? eventInit.detail : 0;
  27. this.view = eventInit.view || null;
  28. }
  29. }
  30. /**
  31. * Init event.
  32. *
  33. * @deprecated
  34. * @param type Type.
  35. * @param [bubbles=false] "true" if it bubbles.
  36. * @param [cancelable=false] "true" if it cancelable.
  37. */
  38. initEvent(type, bubbles = false, cancelable = false) {
  39. this.type = type;
  40. this.bubbles = bubbles;
  41. this.cancelable = cancelable;
  42. }
  43. /**
  44. * Prevents default.
  45. */
  46. preventDefault() {
  47. this.defaultPrevented = true;
  48. }
  49. /**
  50. * Stops immediate propagation.
  51. */
  52. stopImmediatePropagation() {
  53. this._immediatePropagationStopped = true;
  54. }
  55. /**
  56. * Stops propagation.
  57. */
  58. stopPropagation() {
  59. this._propagationStopped = true;
  60. }
  61. }
  62. exports.default = UIEvent;
  63. UIEvent.NONE = 0;
  64. UIEvent.CAPTURING_PHASE = 1;
  65. UIEvent.AT_TARGET = 2;
  66. UIEvent.BUBBLING_PHASE = 3;
  67. //# sourceMappingURL=UIEvent.js.map