MCPcopy Create free account
hub / github.com/google/pprof / handleTouchMove

Function handleTouchMove

internal/driver/html/common.js:174–193  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

172 }
173
174 function handleTouchMove(e) {
175 if (mode == TOUCHPAN) {
176 const t = findTouch(e.changedTouches, touchid);
177 if (t == null) return;
178 if (e.touches.length != 1) {
179 setMode(IDLE);
180 return;
181 }
182 panMove(t.clientX, t.clientY);
183 e.preventDefault();
184 } else if (mode == TOUCHZOOM) {
185 // Get two touches; new gap; rescale to ratio.
186 const t1 = findTouch(e.touches, touchid);
187 const t2 = findTouch(e.touches, touchid2);
188 if (t1 == null || t2 == null) return;
189 const gap = touchGap(t1, t2);
190 rescale(initScale * gap / initGap, centerPoint);
191 e.preventDefault();
192 }
193 }
194
195 function handleTouchEnd(e) {
196 if (mode == TOUCHPAN) {

Callers

nothing calls this directly

Calls 5

findTouchFunction · 0.85
setModeFunction · 0.85
panMoveFunction · 0.85
touchGapFunction · 0.85
rescaleFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…