more digging...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-02-18 19:50:09 +04:00
parent 4b3bb3dfc5
commit 9acfbc4b6b

View File

@ -104,7 +104,7 @@ $(document).ready(function(){
function(k){console.log(k)})) function(k){console.log(k)}))
logger = Logger() //logger = Logger()
var scrolling = false var scrolling = false
var _x = null var _x = null
var _t = null var _t = null
@ -112,10 +112,10 @@ $(document).ready(function(){
// XXX this is a stub, but need to keep the two types of events // XXX this is a stub, but need to keep the two types of events
// seporated as mouse events sometimes interfere with touch events... // seporated as mouse events sometimes interfere with touch events...
if('touchmove' in window){ if('ontouchmove' in window){
$('.viewer') $('.viewer')
.on('touchstart', function(){ .on('touchstart', function(){
logger.log('[touchstart]') //logger.log('[touchstart]')
//_t = evt.timeStamp || Date.now(); //_t = evt.timeStamp || Date.now();
scrolling = true scrolling = true
togglePageDragging('on') togglePageDragging('on')
@ -136,7 +136,7 @@ $(document).ready(function(){
_x = x _x = x
}) })
.on('touchend', function(){ .on('touchend', function(){
logger.log('[touchend]') //logger.log('[touchend]')
scrolling = false scrolling = false
togglePageDragging('off') togglePageDragging('off')
}) })
@ -144,7 +144,7 @@ $(document).ready(function(){
} else { } else {
$('.viewer') $('.viewer')
.on('mousedown', function(){ .on('mousedown', function(){
logger.log('[touchstart]') //logger.log('[touchstart]')
//_t = evt.timeStamp || Date.now(); //_t = evt.timeStamp || Date.now();
scrolling = true scrolling = true
togglePageDragging('on') togglePageDragging('on')
@ -165,7 +165,7 @@ $(document).ready(function(){
_x = x _x = x
}) })
.on('mouseup', function(){ .on('mouseup', function(){
logger.log('[touchend]') //logger.log('[touchend]')
scrolling = false scrolling = false
togglePageDragging('off') togglePageDragging('off')
}) })