MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / pointerMove

Function pointerMove

core/src/utils/gesture/index.ts:90–109  ·  view source on GitHub ↗
(ev: UIEvent)

Source from the content-addressed store, hash-verified

88 };
89
90 const pointerMove = (ev: UIEvent) => {
91 // fast path, if gesture is currently captured
92 // do minimum job to get user-land even dispatched
93 if (hasCapturedPan) {
94 if (!isMoveQueued && hasFiredStart) {
95 isMoveQueued = true;
96 calcGestureData(detail, ev);
97 requestAnimationFrame(fireOnMove);
98 }
99 return;
100 }
101
102 // gesture is currently being detected
103 calcGestureData(detail, ev);
104 if (pan.detect(detail.currentX, detail.currentY)) {
105 if (!pan.isGesture() || !tryToCapturePan()) {
106 abortGesture();
107 }
108 }
109 };
110
111 const fireOnMove = () => {
112 // Since fireOnMove is called inside a RAF, onEnd() might be called,

Callers

nothing calls this directly

Calls 5

calcGestureDataFunction · 0.85
tryToCapturePanFunction · 0.85
abortGestureFunction · 0.85
detectMethod · 0.80
isGestureMethod · 0.80

Tested by

no test coverage detected