Open psugihara opened 7 months ago
$.touches = [...event.touches].map(getTouchInfo);
Isn't property touches an array already?!
I think it's a TouchList
which doesn't have .map
in all implementations.
Oh, now I've got it why: $.touches = [...event.touches].map(getTouchInfo);
BtW, the old way to do that is:
$.touches = Array.prototype.map.call(event.touches, getTouchInfo);
Cool. That seems nice bc it doesn't create a new array.
fixes #22
Hey @LingDong- thanks for this awesome lib. Needed to get touch working for mobile and thought I'd share my solution back.
You use this by setting the handlers on q5: