diff --git a/lib/gallery.js b/lib/gallery.js index ffbe5c3..ff33c17 100644 --- a/lib/gallery.js +++ b/lib/gallery.js @@ -215,7 +215,7 @@ Gallery = (function(superClass) { height: $win.height() - 90 }; showZoom = this.curOriginSize.width > stageSize.width || this.curOriginSize.height > stageSize.height; - this.gallery.css(this._fitSize(stageSize, this.curOriginSize)); + this.gallery.css(this._fitSize(stageSize, originSize)); this.img.attr('src', thumbImg.src); if (showZoom) { this.zoom_in = this.wrapper.find('.zoom-in'); diff --git a/src/gallery.coffee b/src/gallery.coffee index 231065c..4617eb1 100644 --- a/src/gallery.coffee +++ b/src/gallery.coffee @@ -191,7 +191,7 @@ class Gallery extends SimpleModule height: $win.height() - 90 showZoom = @curOriginSize.width > stageSize.width or @curOriginSize.height > stageSize.height - @gallery.css @_fitSize stageSize, @curOriginSize + @gallery.css @_fitSize stageSize, originSize @img.attr('src', thumbImg.src) if showZoom