MCPcopy Create free account
hub / github.com/ColmapView/Colmapview.github.io / buildTouchList

Function buildTouchList

src/test/builders/eventFakes.ts:371–384  ·  view source on GitHub ↗
(touches: Touch[])

Source from the content-addressed store, hash-verified

369}
370
371function buildTouchList(touches: Touch[]): MutableTouchList {
372 const touchList: MutableTouchList = {
373 length: touches.length,
374 item: (index: number) => touches[index] ?? null,
375 identifiedTouch: (identifier: number) => touches.find((touch) => touch.identifier === identifier) ?? touches[0] ?? buildTouch(),
376 [Symbol.iterator]: () => touches[Symbol.iterator](),
377 };
378
379 touches.forEach((touch, index) => {
380 touchList[index] = touch;
381 });
382
383 return touchList;
384}
385
386function defineEventMethodOverrides(
387 event: Event,

Callers 2

constructorMethod · 0.85
buildReactTouchEventFunction · 0.85

Calls 1

buildTouchFunction · 0.85

Tested by

no test coverage detected