MCPcopy Create free account
hub / github.com/ampproject/amphtml / onTouchMove

Method onTouchMove

src/gesture-recognizers.js:147–162  ·  view source on GitHub ↗

@override

(e)

Source from the content-addressed store, hash-verified

145
146 /** @override */
147 onTouchMove(e) {
148 const {touches} = e;
149 if (touches && touches.length == 1) {
150 this.lastX_ = touches[0].clientX;
151 this.lastY_ = touches[0].clientY;
152 const dx = Math.abs(this.lastX_ - this.startX_) >= 8;
153 const dy = Math.abs(this.lastY_ - this.startY_) >= 8;
154 if (dx || dy) {
155 this.acceptCancel();
156 return false;
157 }
158 return true;
159 } else {
160 return false;
161 }
162 }
163
164 /** @override */
165 onTouchEnd(e) {

Callers

nothing calls this directly

Calls 1

acceptCancelMethod · 0.95

Tested by

no test coverage detected