diff --git a/js/Button.js b/js/Button.js index 16b9b4c..e88842d 100644 --- a/js/Button.js +++ b/js/Button.js @@ -28,7 +28,13 @@ var offset = $(element).offset(); _x = e.originalEvent.pageX - offset.left; _y = e.originalEvent.pageY - offset.top; - } + } + + //android+chrome-specific hack + if (e.originalEvent.changedTouches != undefined) { + _x = e.originalEvent.changedTouches[0].pageX - offset.left; + _y = e.originalEvent.changedTouches[0].pageY - offset.top; + } } var startDownTimer = function() { diff --git a/js/canvasDrawing.js b/js/canvasDrawing.js index 582eee2..9f42d4b 100644 --- a/js/canvasDrawing.js +++ b/js/canvasDrawing.js @@ -408,7 +408,7 @@ function onCanvasTouchMove(e) { // var x = e.touches[0].layerX; // var y = e.touches[0].layerY; - console.log("f:onCanvasTouchMove >> x,y = "+x+","+y+" , e: " , e); + //console.log("f:onCanvasTouchMove >> x,y = "+x+","+y+" , e: " , e); if (prevPoint.x != -1 || prevPoint.y != -1) { var dist = Math.sqrt(Math.pow((prevPoint.x - x), 2) + Math.pow((prevPoint.y - y), 2)); diff --git a/js/sketches.js b/js/sketches.js index a376ff3..602f70d 100644 --- a/js/sketches.js +++ b/js/sketches.js @@ -17,7 +17,7 @@ function getSavedSketchStatus() { } } }).fail(function() { - console.log("getSavedSketchStatus failed: ", response); + console.log("getSavedSketchStatus failed"); }); }