FederatedPointerEvent.d.ts 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. import { FederatedMouseEvent } from './FederatedMouseEvent';
  2. export declare class FederatedPointerEvent extends FederatedMouseEvent implements PointerEvent {
  3. /**
  4. * The unique identifier of the pointer.
  5. *
  6. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerId
  7. */
  8. pointerId: number;
  9. /**
  10. * The width of the pointer's contact along the x-axis, measured in CSS pixels.
  11. * radiusX of TouchEvents will be represented by this value.
  12. *
  13. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/width
  14. */
  15. width: number;
  16. /**
  17. * The height of the pointer's contact along the y-axis, measured in CSS pixels.
  18. * radiusY of TouchEvents will be represented by this value.
  19. *
  20. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/height
  21. */
  22. height: number;
  23. /**
  24. * Indicates whether or not the pointer device that created the event is the primary pointer.
  25. *
  26. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/isPrimary
  27. */
  28. isPrimary: boolean;
  29. /**
  30. * The type of pointer that triggered the event.
  31. *
  32. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pointerType
  33. */
  34. pointerType: string;
  35. /**
  36. * Pressure applied by the pointing device during the event.
  37. *s
  38. * A Touch's force property will be represented by this value.
  39. *
  40. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/pressure
  41. */
  42. pressure: number;
  43. /**
  44. * Barrel pressure on a stylus pointer.
  45. *
  46. * @see https://w3c.github.io/pointerevents/#pointerevent-interface
  47. */
  48. tangentialPressure: number;
  49. /**
  50. * The angle, in degrees, between the pointer device and the screen.
  51. *
  52. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltX
  53. */
  54. tiltX: number;
  55. /**
  56. * The angle, in degrees, between the pointer device and the screen.
  57. *
  58. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/tiltY
  59. */
  60. tiltY: number;
  61. /**
  62. * Twist of a stylus pointer.
  63. *
  64. * @see https://w3c.github.io/pointerevents/#pointerevent-interface
  65. */
  66. twist: number;
  67. /**
  68. * @see https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/getCoalescedEvents
  69. */
  70. getCoalescedEvents(): PointerEvent[];
  71. /**
  72. * @see https://chromestatus.com/feature/5765569655603200
  73. */
  74. getPredictedEvents(): PointerEvent[];
  75. /**
  76. * @see https://github.com/antvis/G/issues/1115
  77. * We currently reuses event objects in the event system,
  78. * avoiding the creation of a large number of event objects.
  79. * Reused objects are only used to carry different data,
  80. * such as coordinate information, native event objects,
  81. * and therefore the lifecycle is limited to the event handler,
  82. * which can lead to unintended consequences if an attempt is made to cache the entire event object.
  83. *
  84. * Therefore, while keeping the above performance considerations in mind, it is possible to provide a clone method that creates a new object when the user really wants to cache it, e.g.
  85. */
  86. clone(): FederatedPointerEvent;
  87. }
  88. //# sourceMappingURL=FederatedPointerEvent.d.ts.map