Skip to content

Commit

Permalink
change combined pan-x pan-y to none
Browse files Browse the repository at this point in the history
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 fdae07b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/touchaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fdae07b

Please sign in to comment.