Merge pull request #1 from CartoDB/touchmove

Avoid to process touchmove event if target has class ps-prevent-touch…
This commit is contained in:
Buti 2017-02-14 11:02:53 +01:00 committed by GitHub
commit 735c6c0bf3

View File

@ -88,6 +88,10 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
}
}
function touchMove(e) {
var target = e.target;
var className = target && target.getAttribute('class') || '';
if (!className.match(/ps-prevent-touchmove/)) {
if (!inLocalTouch && i.settings.swipePropagation) {
touchStart(e);
}
@ -117,6 +121,7 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
}
}
}
}
function touchEnd() {
if (!inGlobalTouch && inLocalTouch) {
inLocalTouch = false;