MCPcopy Create free account
hub / github.com/dailydotdev/apps / onTouchStart

Function onTouchStart

packages/shared/src/components/shell/sheetDrag.ts:118–135  ·  view source on GitHub ↗
(event: TouchEvent)

Source from the content-addressed store, hash-verified

116 };
117
118 const onTouchStart = (event: TouchEvent) => {
119 if (
120 (scroller()?.scrollTop ?? 0) > 0 ||
121 event.touches.length !== 1 ||
122 startsInContent(event.target)
123 ) {
124 return;
125 }
126 startX = event.touches[0].clientX ?? 0;
127 startY = event.touches[0].clientY;
128 lastY = startY;
129 startTime = event.timeStamp;
130 lastTime = startTime;
131 velocity = 0;
132 dy = 0;
133 tracking = true;
134 dragging = false;
135 };
136
137 const beginDrag = () => {
138 endSettle();

Callers

nothing calls this directly

Calls 1

startsInContentFunction · 0.85

Tested by

no test coverage detected