MCPcopy Create free account
hub / github.com/dcloudio/mui / copySimpleTouchData

Function copySimpleTouchData

js/mui.gestures.js:203–221  ·  view source on GitHub ↗
(touch)

Source from the content-addressed store, hash-verified

201 return $.options.gestureConfig.pinch;
202 };
203 var copySimpleTouchData = function(touch) {
204 var touches = [];
205 var i = 0;
206 while (i < touch.touches.length) {
207 touches[i] = {
208 pageX: round(touch.touches[i].pageX),
209 pageY: round(touch.touches[i].pageY)
210 };
211 i++;
212 }
213 return {
214 timestamp: $.now(),
215 gesture: touch.gesture,
216 touches: touches,
217 center: getMultiCenter(touch.touches),
218 deltaX: touch.deltaX,
219 deltaY: touch.deltaY
220 };
221 };
222
223 var calDelta = function(touch) {
224 var session = $.gestures.session;

Callers 1

calTouchDataFunction · 0.70

Calls 1

getMultiCenterFunction · 0.70

Tested by

no test coverage detected