Merge pull request #1 from CartoDB/touchmove
Avoid to process touchmove event if target has class ps-prevent-touch…
This commit is contained in:
commit
735c6c0bf3
@ -88,6 +88,10 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function touchMove(e) {
|
function touchMove(e) {
|
||||||
|
var target = e.target;
|
||||||
|
var className = target && target.getAttribute('class') || '';
|
||||||
|
|
||||||
|
if (!className.match(/ps-prevent-touchmove/)) {
|
||||||
if (!inLocalTouch && i.settings.swipePropagation) {
|
if (!inLocalTouch && i.settings.swipePropagation) {
|
||||||
touchStart(e);
|
touchStart(e);
|
||||||
}
|
}
|
||||||
@ -117,6 +121,7 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
function touchEnd() {
|
function touchEnd() {
|
||||||
if (!inGlobalTouch && inLocalTouch) {
|
if (!inGlobalTouch && inLocalTouch) {
|
||||||
inLocalTouch = false;
|
inLocalTouch = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user