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

Method onTouchMove

src/gesture-recognizers.js:56–68  ·  view source on GitHub ↗

@override

(e)

Source from the content-addressed store, hash-verified

54
55 /** @override */
56 onTouchMove(e) {
57 const touches = e.changedTouches || e.touches;
58 if (touches && touches.length == 1) {
59 this.lastX_ = touches[0].clientX;
60 this.lastY_ = touches[0].clientY;
61 const dx = Math.abs(this.lastX_ - this.startX_) >= 8;
62 const dy = Math.abs(this.lastY_ - this.startY_) >= 8;
63 if (dx || dy) {
64 return false;
65 }
66 }
67 return true;
68 }
69
70 /** @override */
71 onTouchEnd(unusedE) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected