From 573ca20640b48beca208022c638a66b5a2c683aa Mon Sep 17 00:00:00 2001 From: krusty Date: Wed, 4 Dec 2013 20:41:17 -0200 Subject: [PATCH] Fix lens proportion calculation The condition was incorrectly checking for the width of the zoom window instead of the height, causing the lens to be equal height with the non-zoomed image when the actual viewport was smaller --- jquery.elevatezoom.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery.elevatezoom.js b/jquery.elevatezoom.js index 1813e2d..205a9f3 100644 --- a/jquery.elevatezoom.js +++ b/jquery.elevatezoom.js @@ -189,7 +189,7 @@ if ( typeof Object.create !== 'function' ) { // adjust images less than the window height - if(self.nzHeight < self.options.zoomWindowWidth/self.widthRatio){ + if(self.nzHeight < self.options.zoomWindowHeight/self.heightRatio){ lensHeight = self.nzHeight; } else{ @@ -1774,4 +1774,4 @@ if ( typeof Object.create !== 'function' ) { onImageSwapComplete: $.noop }; -})( jQuery, window, document ); \ No newline at end of file +})( jQuery, window, document );