Skip to content

Commit

Permalink
Merge pull request i-like-robots#91 from amaltsev/issue-88
Browse files Browse the repository at this point in the history
Fixed zoom image smaller than fly-out
  • Loading branch information
i-like-robots authored Sep 6, 2016
2 parents ff9cad9 + 1c7084c commit 81d3dc8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/easyzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@
dw = this.$zoom.width() - w2;
dh = this.$zoom.height() - h2;

// For the case where the zoom image is actually smaller than
// the flyout.
//
if(dw<0) dw=0;
if(dh<0) dh=0;

rw = dw / w1;
rh = dh / h1;

Expand Down

0 comments on commit 81d3dc8

Please sign in to comment.