Permalink
Browse files

change combined pan-x pan-y to none

if both `pan-x` and `pan-y` are set (different recognizers for different
directions, e.g. horizontal pan but vertical swipe?) we need `none` (as
otherwise with `pan-x pan-y` combined none of these recognizers will
work, since the browser would handle all panning.
  • Loading branch information...
patrickhlauke committed Oct 7, 2015
1 parent f20533d commit fdae07bc2ba3c90aad28da6791b3d5df627bc612
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/touchaction.js
View
@@ -126,9 +126,12 @@ function cleanTouchActions(actions) {
var hasPanX = inStr(actions, TOUCH_ACTION_PAN_X);
var hasPanY = inStr(actions, TOUCH_ACTION_PAN_Y);
- // pan-x and pan-y can be combined
+ // if both pan-x and pan-y are set (different recognizers
+ // for different directions, e.g. horizontal pan but vertical swipe?)
+ // we need none (as otherwise with pan-x pan-y combined none of these
+ // recognizers will work, since the browser would handle all panning
if (hasPanX && hasPanY) {
- return TOUCH_ACTION_PAN_X + ' ' + TOUCH_ACTION_PAN_Y;
+ return TOUCH_ACTION_NONE;
}
// pan-x OR pan-y

0 comments on commit fdae07b

Please sign in to comment.