Skip to content
This repository has been archived by the owner on Oct 8, 2021. It is now read-only.

Commit

Permalink
Fix pixel density on android swipe event
Browse files Browse the repository at this point in the history
Fixes swipe events for all pixel densities.
  • Loading branch information
TNT-RoX committed May 27, 2014
1 parent 039c0b6 commit 6365153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/events/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ define( [ "jquery", "../vmouse", "../support/touch" ], function( jQuery ) {
durationThreshold: 1000,

// Swipe horizontal displacement must be more than this.
horizontalDistanceThreshold: 30,
horizontalDistanceThreshold: window.devicePixelRatio >= 2 ? 15 : 30,

// Swipe vertical displacement must be less than this.
verticalDistanceThreshold: 30,
verticalDistanceThreshold: window.devicePixelRatio >= 2 ? 15 : 30,

getLocation: function ( event ) {
var winPageX = window.pageXOffset,
Expand Down

0 comments on commit 6365153

Please sign in to comment.