Skip to content

Commit

Permalink
Merge pull request #64 from AnastasiaBuniakEPAM/JS-328
Browse files Browse the repository at this point in the history
JS-328: Drag/swipe of vertical thumbnails stopped working on mobile devices
  • Loading branch information
uharbachou1 committed Dec 4, 2015
2 parents 1648394 + 8994078 commit fa5cb0c
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions lib/web/fotorama/fotorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -1433,14 +1433,8 @@ fotoramaVersion = '4.6.4';
xWin = (tail.go || tail.x || xyDiff >= 0) && !tail.noSwipe,
yWin = xyDiff < 0;

if (touchFLAG && !tail.checked) {
if (touchEnabledFLAG = xWin) {
stopEvent(e);
}
} else {
stopEvent(e);
(options.onMove || noop).call(el, e, {touch: touchFLAG});
}
stopEvent(e);
(options.onMove || noop).call(el, e, {touch: touchFLAG});

if (!moved && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) {
moved = true;
Expand Down Expand Up @@ -1481,16 +1475,12 @@ fotoramaVersion = '4.6.4';

function onOtherStart() {
if (tail.flow) return;
setTimeout(function () {
tail.flow = true;
}, 10);
tail.flow = true;
}

function onOtherEnd() {
if (!tail.flow) return;
setTimeout(function () {
tail.flow = false;
}, TOUCH_TIMEOUT);
tail.flow = false;
}

if (MS_POINTER) {
Expand Down

0 comments on commit fa5cb0c

Please sign in to comment.