update swipe threshold
This commit is contained in:
parent
aed8bc7702
commit
2f4b2cb496
@ -162,10 +162,20 @@ define(
|
|||||||
var dx = touchPos.x - touchStartPos.x;
|
var dx = touchPos.x - touchStartPos.x;
|
||||||
|
|
||||||
if ( translateX > -navWidth && translateX < 0 && Math.abs( dx ) > 0 ) {
|
if ( translateX > -navWidth && translateX < 0 && Math.abs( dx ) > 0 ) {
|
||||||
if ( translateX < -navWidth / 2 ) {
|
if ( dx > 0 ) {
|
||||||
deactivate();
|
// swiped in
|
||||||
|
if ( translateX < -navWidth * 0.75 ) {
|
||||||
|
deactivate();
|
||||||
|
} else {
|
||||||
|
activate();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
activate();
|
// swiped out
|
||||||
|
if ( translateX < -navWidth * 0.25 ) {
|
||||||
|
deactivate();
|
||||||
|
} else {
|
||||||
|
activate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user