mirror of
https://github.com/flynx/PortableMag.git
synced 2025-10-29 11:10:08 +00:00
doing some polishing...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
edfdedcb61
commit
2276c2d3cd
@ -108,7 +108,7 @@ $(document).ready(function(){
|
|||||||
var scrolling = false
|
var scrolling = false
|
||||||
var _x = null
|
var _x = null
|
||||||
var _t = null
|
var _t = null
|
||||||
USE_TRANSFORM = true
|
var _s = null
|
||||||
|
|
||||||
// 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...
|
||||||
@ -119,6 +119,7 @@ $(document).ready(function(){
|
|||||||
//_t = evt.timeStamp || Date.now();
|
//_t = evt.timeStamp || Date.now();
|
||||||
scrolling = true
|
scrolling = true
|
||||||
togglePageDragging('on')
|
togglePageDragging('on')
|
||||||
|
_s = getMagazineShift()
|
||||||
})
|
})
|
||||||
.on('touchmove', function(evt){
|
.on('touchmove', function(evt){
|
||||||
evt.preventDefault()
|
evt.preventDefault()
|
||||||
@ -129,9 +130,9 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
var x = pos_x
|
var x = pos_x
|
||||||
if(scrolling){
|
if(scrolling){
|
||||||
var s = getMagazineShift()
|
|
||||||
//logger.log('>>>' + s)
|
//logger.log('>>>' + s)
|
||||||
shiftMagazineTo(s + (x - _x))
|
_s += x - _x
|
||||||
|
shiftMagazineTo(_s)
|
||||||
}
|
}
|
||||||
_x = x
|
_x = x
|
||||||
})
|
})
|
||||||
@ -140,6 +141,7 @@ $(document).ready(function(){
|
|||||||
scrolling = false
|
scrolling = false
|
||||||
togglePageDragging('off')
|
togglePageDragging('off')
|
||||||
_x = null
|
_x = null
|
||||||
|
_s = null
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -149,6 +151,7 @@ $(document).ready(function(){
|
|||||||
//_t = evt.timeStamp || Date.now();
|
//_t = evt.timeStamp || Date.now();
|
||||||
scrolling = true
|
scrolling = true
|
||||||
togglePageDragging('on')
|
togglePageDragging('on')
|
||||||
|
_s = getMagazineShift()
|
||||||
})
|
})
|
||||||
.on('mousemove', function(evt){
|
.on('mousemove', function(evt){
|
||||||
//var t = evt.timeStamp || Date.now();
|
//var t = evt.timeStamp || Date.now();
|
||||||
@ -160,8 +163,8 @@ $(document).ready(function(){
|
|||||||
}
|
}
|
||||||
var x = pos_x
|
var x = pos_x
|
||||||
if(scrolling){
|
if(scrolling){
|
||||||
var s = getMagazineShift()
|
_s += x - _x
|
||||||
shiftMagazineTo(s + (x - _x))
|
shiftMagazineTo(_s)
|
||||||
}
|
}
|
||||||
_x = x
|
_x = x
|
||||||
})
|
})
|
||||||
@ -170,6 +173,7 @@ $(document).ready(function(){
|
|||||||
scrolling = false
|
scrolling = false
|
||||||
togglePageDragging('off')
|
togglePageDragging('off')
|
||||||
_x = null
|
_x = null
|
||||||
|
_s = null
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user