MCPcopy
hub / github.com/tomkp/react-split-pane / createPointerEvent

Function createPointerEvent

src/hooks/useResizer.test.ts:15–31  ·  view source on GitHub ↗
(
  type: string,
  options: {
    clientX?: number;
    clientY?: number;
    pointerId?: number;
    pointerType?: string;
  } = {}
)

Source from the content-addressed store, hash-verified

13
14// Helper to create a PointerEvent with required properties
15function createPointerEvent(
16 type: string,
17 options: {
18 clientX?: number;
19 clientY?: number;
20 pointerId?: number;
21 pointerType?: string;
22 } = {}
23): PointerEvent {
24 return new PointerEvent(type, {
25 clientX: options.clientX ?? 0,
26 clientY: options.clientY ?? 0,
27 pointerId: options.pointerId ?? 1,
28 pointerType: options.pointerType ?? 'mouse',
29 bubbles: true,
30 });
31}
32
33// Helper to create a mock React PointerEvent with nativeEvent
34function createMockReactPointerEvent(

Callers 1

useResizer.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…