mirror of
https://github.com/flynx/PortableMag.git
synced 2025-12-22 03:22:02 +00:00
another experiment.............
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
146144dcd8
commit
b26a83cb45
15
layout.html
15
layout.html
@ -114,17 +114,13 @@ $(document).ready(function(){
|
|||||||
var TIMEOUT = 100
|
var TIMEOUT = 100
|
||||||
var t = 0
|
var t = 0
|
||||||
|
|
||||||
function _monitor(){
|
|
||||||
if(!touching){
|
|
||||||
v.trigger('scrollend')
|
|
||||||
clearTimeout(t)
|
|
||||||
} else {
|
|
||||||
log('timed out...')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function monitor_scroll(){
|
function monitor_scroll(){
|
||||||
clearTimeout(t)
|
clearTimeout(t)
|
||||||
t = setTimeout(_monitor, TIMEOUT)
|
t = setTimeout(function(){
|
||||||
|
if(!touching){
|
||||||
|
v.trigger('scrollend')
|
||||||
|
}
|
||||||
|
}, TIMEOUT)
|
||||||
}
|
}
|
||||||
|
|
||||||
$('.viewer')
|
$('.viewer')
|
||||||
@ -139,7 +135,6 @@ $(document).ready(function(){
|
|||||||
.on('touchend mouseup', function(evt){
|
.on('touchend mouseup', function(evt){
|
||||||
//log('touchend...')
|
//log('touchend...')
|
||||||
touching = false
|
touching = false
|
||||||
monitor_scroll()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
.on('scrollend', function(){
|
.on('scrollend', function(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user