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