more testing...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2013-02-14 00:14:47 +04:00
parent bcfcb2c0d3
commit a363984aaf

View File

@ -127,17 +127,26 @@ $(document).ready(function(){
function(k){console.log(k)}))
//if(NAVIGATE_RELATIVE_TO_VISIBLE){
$('.viewer')
.on('scrollstop', function(evt){
//log('scrollstop...')
// XXX for some reason, on android, this sets the page but
// does not actually scroll to it -- no animation and/or
// .ScrollTo does notwork...
//setCurrentPage()
//limit_scroll()
})
//}
var touching = false
var t = null
$('.viewer')
.on('mousedown touchstart', function(){
touching = true
clearTimeout(t)
})
.on('mouseup touchend', function(){
touching = false
})
.on('scrollstop', function(evt){
//log('scrollstop...')
// XXX for some reason, on android, this sets the page but
// does not actually scroll to it -- no animation and/or
// .ScrollTo does notwork...
//limit_scroll()
if(!touching){
t = setTimeout(setCurrentPage, 100)
}
})
if(!NAVIGATE_RELATIVE_TO_VISIBLE){
$('.viewer').css({overflow: 'hidden'})