From 79545b0dfb90d43e8eccc13926d8601470440598 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Sun, 2 Feb 2014 13:18:10 +0330 Subject: [PATCH] touch and mouse --- js/main.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/js/main.js b/js/main.js index 51eca43..df78ee3 100644 --- a/js/main.js +++ b/js/main.js @@ -16,22 +16,16 @@ $(document).ready(function() { sizeAndPos(); $(window).resize(sizeAndPos); - $c.on('mousedown touchstart', function(e) { - + $c.bind('mousedown touchstart', function(e) { var xy = relative(e.pageX, e.pageY); startPoint(xy.x, xy.y); window.active = true; - - }).on('mousemove touchmove', function(e) { - + }).bind('mousemove touchmove', function(e) { if (!window.active || settings.type == 'line') return; var xy = relative(e.pageX, e.pageY); drawPoint(xy.x, xy.y); - - }).on('mouseup touchend', function() { - + }).bind('mouseup touchend', function() { window.active = false; - }) })