Open emitategh opened 8 years ago
I was replace with the below code. The below function is found in 98th line in sketch.js file
Sketch.prototype.onEvent = function(e) {
if (e.originalEvent && e.originalEvent.targetTouches &&(e.originalEvent.targetTouches.length>0)) {
e.pageX = e.originalEvent.targetTouches[0].pageX;
e.pageY = e.originalEvent.targetTouches[0].pageY;
}
$.sketch.tools[$(this).data('sketch').tool].onEvent.call($(this).data('sketch'), e);
e.preventDefault();
return false;
};
Hi, I was getting an "undefined getX" or "undefined getY" Because e.originalEvent.targetTouches had length 0 on last touchevent, that caused canvas to be wiped clear.