MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / TouchStart

Function TouchStart

src/tailwind/Backgrounds/Ballpit/Ballpit.jsx:329–348  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

327}
328
329function TouchStart(e) {
330 if (e.touches.length > 0) {
331 e.preventDefault();
332 A.x = e.touches[0].clientX;
333 A.y = e.touches[0].clientY;
334
335 for (const [elem, t] of b) {
336 const rect = elem.getBoundingClientRect();
337 if (D(rect)) {
338 t.touching = true;
339 P(t, rect);
340 if (!t.hover) {
341 t.hover = true;
342 t.onEnter(t);
343 }
344 t.onMove(t);
345 }
346 }
347 }
348}
349
350function TouchMove(e) {
351 if (e.touches.length > 0) {

Callers

nothing calls this directly

Calls 2

DFunction · 0.70
PFunction · 0.70

Tested by

no test coverage detected