Skip to content

Commit

Permalink
[backport] issue - 21507
Browse files Browse the repository at this point in the history
  • Loading branch information
Nazar65 committed Apr 1, 2019
1 parent 0d99fa8 commit 744986b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 10 additions & 2 deletions lib/web/fotorama/fotorama.js
Original file line number Diff line number Diff line change
Expand Up @@ -1455,16 +1455,24 @@ fotoramaVersion = '4.6.4';
}
} else {
stopEvent(e);
(options.onMove || noop).call(el, e, {touch: touchFLAG});
if (movedEnough(xDiff,yDiff)) {
(options.onMove || noop).call(el, e, {touch: touchFLAG});
}
}

if (!moved && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance) {
if (!moved && movedEnough(xDiff, yDiff) && Math.sqrt(Math.pow(xDiff, 2) + Math.pow(yDiff, 2)) > tolerance)
{
moved = true;
}

tail.checked = tail.checked || xWin || yWin;
}


function movedEnough(xDiff, yDiff) {
return xDiff > yDiff && xDiff > 1.5;
}

function onEnd(e) {
(options.onTouchEnd || noop)();

Expand Down
Loading

0 comments on commit 744986b

Please sign in to comment.