Permalink
Browse files

fix incorrect touch action pan direction

if i want to intercept/handle horizontal pans/swipes, i need `pan-y`,
not `pan-x` (as touch-action determines which default actions the
browser should handle - if i wanted to do my own horizontal pans/swipes,
i DON'T want the browser to handle `pan-x`). the fact that this code
seems to currently work regardless may be due to other logic in the
script, like the part where `touch-action` is combined...
  • Loading branch information...
patrickhlauke committed Oct 7, 2015
1 parent fdae07b commit a81da57a82ebf37e695e7c443e4e2715e7f32856
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/recognizers/pan.js
View
@@ -27,10 +27,10 @@ inherit(PanRecognizer, AttrRecognizer, {
var direction = this.options.direction;
var actions = [];
if (direction & DIRECTION_HORIZONTAL) {
- actions.push(TOUCH_ACTION_PAN_X);
+ actions.push(TOUCH_ACTION_PAN_Y);
}
if (direction & DIRECTION_VERTICAL) {
- actions.push(TOUCH_ACTION_PAN_Y);
+ actions.push(TOUCH_ACTION_PAN_X);
}
return actions;
},

0 comments on commit a81da57

Please sign in to comment.