Skip to content

Commit

Permalink
JS-359: Magnifier on preview swipe/drag
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasiiabuniak committed Dec 7, 2015
1 parent 9512a46 commit d322132
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/web/magnifier/magnify.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ define([
zoomOutDisabled = 'fotorama__zoom-out--disabled',
videoContainerClass = 'fotorama-video-container',
hideMagnifier,
behaveOnDrag,
dragFlag,
endX,
allowZoomOut = false,
Expand Down Expand Up @@ -758,7 +757,7 @@ define([
/**
* Hides magnifier on drag and while arrow click.
*/
behaveOnDrag = function (e, initPos) {
function behaveOnDrag (e, initPos) {
var pos = [e.pageX, e.pageY],
isArrow = $(e.target).data('gallery-role') === 'arrow',
isClick = initPos[0] === pos[0] && initPos[1] === pos[1],
Expand All @@ -767,7 +766,7 @@ define([
if (isArrow || (isImg && !isClick)) {
hideMagnifier();
}
};
}

if (config.magnifierOpts.enabled) {
$(element).on('pointerdown mousedown MSPointerDown', function (e) {
Expand Down

0 comments on commit d322132

Please sign in to comment.