Skip to content

Commit b5cff48

Browse files
committed
- Fixing issue with scrollOverflow extension and touch devices.
- Updating version and dist files
1 parent ef11829 commit b5cff48

13 files changed

+40
-42
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
![compatibility](http://alvarotrigo.com/multiScroll/imgs/compatible.gif)
55

66
---
7-
![multiScroll.js version](http://img.shields.io/badge/multiscroll.js-v0.2.0-brightgreen.svg)
7+
![multiScroll.js version](http://img.shields.io/badge/multiscroll.js-v0.2.1-brightgreen.svg)
88
[![License](http://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
99
[![PayPal Donate](https://img.shields.io/badge/donate-PayPal.me-ff69b4.svg)](https://www.paypal.me/alvarotrigo/9.95)
1010
   **|**   *3.7Kb gziped*   **|**   *Created by [@imac2](https://twitter.com/imac2)*

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "multiscroll.js",
3-
"version": "0.1.9",
3+
"version": "0.2.1",
44
"homepage": "http://alvarotrigo.com/multiScroll/",
55
"authors": [
66
"Alvaro Trigo https://github.com/alvarotrigo"

dist/jquery.multiscroll.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* multiscroll.js 0.2.0
2+
* multiscroll.js 0.2.1
33
* https://github.com/alvarotrigo/multiscroll.js
44
* @license MIT licensed
55
*

dist/jquery.multiscroll.extensions.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.multiscroll.js

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* multiscroll.js 0.2.0
2+
* multiscroll.js 0.2.1
33
* https://github.com/alvarotrigo/multiscroll.js
44
* @license MIT licensed
55
*
@@ -65,6 +65,11 @@
6565
var isMoving = false;
6666
var nav;
6767
var windowHeight = $(window).height();
68+
var MSPointer = getMSPointer();
69+
var events = {
70+
touchmove: 'ontouchmove' in window ? 'touchmove' : MSPointer.move,
71+
touchstart: 'ontouchstart' in window ? 'touchstart' : MSPointer.down
72+
};
6873

6974
//timeouts
7075
var resizeId;
@@ -812,25 +817,19 @@
812817
* Adds the possibility to auto scroll through sections on touch devices.
813818
*/
814819
function addTouchHandler(){
815-
if(isTouch){
816-
//Microsoft pointers
817-
MSPointer = getMSPointer();
818-
819-
$(document).off('touchstart ' + MSPointer.down).on('touchstart ' + MSPointer.down, touchStartHandler);
820-
$(document).off('touchmove ' + MSPointer.move).on('touchmove ' + MSPointer.move, touchMoveHandler);
820+
if(isTouch || isTouchDevice){
821+
$(document).off(events.touchstart).on(events.touchstart, touchStartHandler);
822+
$(document).off(events.touchmove).on(events.touchmove, touchMoveHandler);
821823
}
822824
}
823825

824826
/**
825827
* Removes the auto scrolling for touch devices.
826828
*/
827829
function removeTouchHandler(){
828-
if(isTouch){
829-
//Microsoft pointers
830-
MSPointer = getMSPointer();
831-
832-
$(document).off('touchstart ' + MSPointer.down);
833-
$(document).off('touchmove ' + MSPointer.move);
830+
if(isTouch || isTouchDevice){
831+
$(document).off(events.touchstart);
832+
$(document).off(events.touchmove);
834833
}
835834
}
836835

@@ -865,7 +864,7 @@
865864
events.x = (typeof e.pageX !== 'undefined' && (e.pageY || e.pageX) ? e.pageX : e.touches[0].pageX);
866865

867866
//in touch devices with scrollBar:true, e.pageY is detected, but we have to deal with touch events. #1008
868-
if(isTouch && isReallyTouch(e)){
867+
if(isTouch && isReallyTouch(e) && typeof e.touches !== 'undefined'){
869868
events.y = e.touches[0].pageY;
870869
events.x = e.touches[0].pageX;
871870
}

dist/jquery.multiscroll.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/jquery.multiscroll.min.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)