mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-05-01 11:24:42 +00:00
updated swipe event detection to use 30px minimum distance and 20px tolerance
This commit is contained in:
parent
a460710557
commit
517e07059a
1 changed files with 2 additions and 2 deletions
|
|
@ -141,8 +141,8 @@ $.event.special.swipe = {
|
|||
$this.unbind( touchMoveEvent, moveHandler );
|
||||
if ( start && stop ) {
|
||||
if ( stop.time - start.time < 1000 &&
|
||||
Math.abs( start.coords[0] - stop.coords[0]) > 180 &&
|
||||
Math.abs( start.coords[1] - stop.coords[1]) < 80 ) {
|
||||
Math.abs( start.coords[0] - stop.coords[0]) > 30 &&
|
||||
Math.abs( start.coords[1] - stop.coords[1]) < 20 ) {
|
||||
start.origin
|
||||
.trigger( "swipe" )
|
||||
.trigger( start.coords[0] > stop.coords[0] ? "swipeleft" : "swiperight" );
|
||||
|
|
|
|||
Loading…
Reference in a new issue