MCPcopy Create free account
hub / github.com/CoderOpen/waimai / touchMove

Function touchMove

front/wxcomponents/vant/mixins/touch.js:26–33  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

24 this.startY = touch.clientY;
25 },
26 touchMove(event) {
27 const touch = event.touches[0];
28 this.deltaX = touch.clientX - this.startX;
29 this.deltaY = touch.clientY - this.startY;
30 this.offsetX = Math.abs(this.deltaX);
31 this.offsetY = Math.abs(this.deltaY);
32 this.direction = this.direction || getDirection(this.offsetX, this.offsetY);
33 }
34 }
35});

Callers

nothing calls this directly

Calls 1

getDirectionFunction · 0.85

Tested by

no test coverage detected