Skip to content

Commit

Permalink
修改无用代码
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangRui committed Sep 3, 2015
1 parent b0724c9 commit fb842c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
5 changes: 2 additions & 3 deletions lib/gallery.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Gallery = (function(superClass) {
};

Gallery.prototype._renderImage = function() {
var $win, fitSize, originSize, showZoom, stageSize, thumbImg;
var $win, originSize, showZoom, stageSize, thumbImg;
if (!this.gallery) {
return;
}
Expand All @@ -215,8 +215,7 @@ Gallery = (function(superClass) {
height: $win.height() - 90
};
showZoom = this.curOriginSize.width > stageSize.width || this.curOriginSize.height > stageSize.height;
fitSize = this._fitSize(stageSize, this.curOriginSize);
this.gallery.css(fitSize);
this.gallery.css(this._fitSize(stageSize, this.curOriginSize));
this.img.attr('src', thumbImg.src);
if (showZoom) {
this.zoom_in = this.wrapper.find('.zoom-in');
Expand Down
4 changes: 1 addition & 3 deletions src/gallery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,7 @@ class Gallery extends SimpleModule
height: $win.height() - 90
showZoom = @curOriginSize.width > stageSize.width or @curOriginSize.height > stageSize.height

fitSize = @_fitSize stageSize, @curOriginSize

@gallery.css fitSize
@gallery.css @_fitSize stageSize, @curOriginSize
@img.attr('src', thumbImg.src)

if showZoom
Expand Down

0 comments on commit fb842c2

Please sign in to comment.