From 6365153911199456b2ae2d4f356ed69e7c0ad85f Mon Sep 17 00:00:00 2001 From: TNT-RoX Date: Tue, 27 May 2014 15:12:11 +0200 Subject: [PATCH] Fix pixel density on android swipe event Fixes swipe events for all pixel densities. --- js/events/touch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/events/touch.js b/js/events/touch.js index dfa2e0cc81f..8821b9aeea3 100644 --- a/js/events/touch.js +++ b/js/events/touch.js @@ -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,