parent
664dec23d6
commit
ee4fc96b7a
@ -531,7 +531,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
function bindTouchHandler() {
|
||||
function bindTouchHandler(supportsTouch, supportsIePointer) {
|
||||
function applyTouchMove(differenceX, differenceY) {
|
||||
$this.scrollTop($this.scrollTop() - differenceY);
|
||||
$this.scrollLeft($this.scrollLeft() - differenceX);
|
||||
@ -613,12 +613,15 @@
|
||||
}, 10);
|
||||
}
|
||||
|
||||
if (supportsTouch) {
|
||||
$(window).bind("touchstart" + eventClassName, globalTouchStart);
|
||||
$(window).bind("touchend" + eventClassName, globalTouchEnd);
|
||||
$this.bind("touchstart" + eventClassName, touchStart);
|
||||
$this.bind("touchmove" + eventClassName, touchMove);
|
||||
$this.bind("touchend" + eventClassName, touchEnd);
|
||||
}
|
||||
|
||||
if (supportsIePointer) {
|
||||
if (window.PointerEvent) {
|
||||
$(window).bind("pointerdown" + eventClassName, globalTouchStart);
|
||||
$(window).bind("pointerup" + eventClassName, globalTouchEnd);
|
||||
@ -633,6 +636,7 @@
|
||||
$this.bind("MSPointerUp" + eventClassName, touchEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function bindScrollHandler() {
|
||||
$this.bind('scroll' + eventClassName, function (e) {
|
||||
@ -689,7 +693,7 @@
|
||||
bindMouseWheelHandler();
|
||||
|
||||
if (supportsTouch || supportsIePointer) {
|
||||
bindTouchHandler();
|
||||
bindTouchHandler(supportsTouch, supportsIePointer);
|
||||
}
|
||||
if (settings.useKeyboard) {
|
||||
bindKeyboardHandler();
|
||||
|
Loading…
Reference in New Issue
Block a user