mirror of
https://github.com/flynx/PortableMag.git
synced 2025-11-01 12:30:19 +00:00
more digging...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2616d6028e
commit
324356ae7b
@ -120,13 +120,18 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
.on('mousemove touchmove', function(evt){
|
.on('mousemove touchmove', function(evt){
|
||||||
//var t = evt.timeStamp || Date.now();
|
//var t = evt.timeStamp || Date.now();
|
||||||
//evt.preventDefault()
|
evt.preventDefault()
|
||||||
if(_x == null){
|
if(evt.touches && evt.touches.length > 0){
|
||||||
_x = evt.clientX
|
var pos_x = evt.touches[0].pointX
|
||||||
|
} else {
|
||||||
|
var pos_x = evt.clientX
|
||||||
}
|
}
|
||||||
var x = evt.clientX
|
|
||||||
|
if(_x == null){
|
||||||
|
_x = pos_x
|
||||||
|
}
|
||||||
|
var x = pos_x
|
||||||
if(scrolling && Math.abs(x-_x) > 6){
|
if(scrolling && Math.abs(x-_x) > 6){
|
||||||
console.log('drag...')
|
|
||||||
var s = getMagazineShift()
|
var s = getMagazineShift()
|
||||||
shiftMagazineTo(s + (x - _x))
|
shiftMagazineTo(s + (x - _x))
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user