Skip to content

Commit

Permalink
Merge pull request #75 from ValeryYafremau/JS-361
Browse files Browse the repository at this point in the history
JS-361: Magnifier is visible on mobile breakpoint
  • Loading branch information
uharbachou1 committed Dec 14, 2015
2 parents 14096d1 + ba7ea45 commit 08d4adf
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions lib/web/magnifier/magnifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,16 @@
}

data[idx].lensH = data[idx].lensH > $thumb.height() ? $thumb.height() : data[idx].lensH;
lens.css({
width: data[idx].lensW + 1 + 'px',
height: data[idx].lensH - 1 + 'px'
});

if (Math.round(data[idx].lensW) === 0) {
lens.css('display', 'none');
} else {
lens.css({
width: data[idx].lensW + 1 + 'px',
height: data[idx].lensH - 1 + 'px',
display: ''
});
}
}

function getMousePos() {
Expand Down

0 comments on commit 08d4adf

Please sign in to comment.