Skip to content

Commit 174fa11

Browse files
committed
fix
1 parent 3012c43 commit 174fa11

1 file changed

Lines changed: 14 additions & 15 deletions

File tree

Picviewer CE+/Picviewer CE+.user.js

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// @description Powerful picture viewing tool online, which can popup/scale/rotate/batch save pictures or find the HD original picture automatically
77
// @description:zh-CN NLF 的围观图修改版,增加高清原图查找显示(在线看图工具,支持图片翻转、旋转、缩放、弹出大图、批量保存、查找原图)
88
// @description:zh-TW NLF 的圍觀圖修改版,增加高清原圖查詢顯示(線上看圖工具,支援圖片翻轉、旋轉、縮放、彈出大圖、批量儲存、查詢原圖)
9-
// @version 2016.12.16.1
9+
// @version 2016.12.23.1
1010
// @created 2011-6-15
1111
// @namespace http://userscripts.org/users/NLF
1212
// @homepage http://hoothin.com
@@ -5334,23 +5334,22 @@ background-color:rgba(255, 0, 0, 0.150);\
53345334
imgWindow.style.left=-5 + scrolled.x + 'px';
53355335
imgWindow.style.top=-5 + scrolled.y + 'px';
53365336

5337-
if(prefs.imgWindow.fitToScreen){
5337+
//window的尺寸
5338+
var wSize=getWindowSize();
5339+
//空隙
5340+
wSize.h -= 16;
5341+
wSize.w -= 16;
5342+
5343+
var imgWindowCS=unsafeWindow.getComputedStyle(imgWindow);
5344+
5345+
var rectSize={
5346+
h:parseFloat(imgWindowCS.height),
5347+
w:parseFloat(imgWindowCS.width),
5348+
};
5349+
if(prefs.imgWindow.fitToScreen && !(rectSize.h/rectSize.w > 3.5 && rectSize.h > wSize.h)){
53385350
this.fitToScreen();
53395351
this.center(true,true);
53405352
}else{
5341-
//window的尺寸
5342-
var wSize=getWindowSize();
5343-
//空隙
5344-
wSize.h -= 16;
5345-
wSize.w -= 16;
5346-
5347-
var imgWindowCS=unsafeWindow.getComputedStyle(imgWindow);
5348-
5349-
var rectSize={
5350-
h:parseFloat(imgWindowCS.height),
5351-
w:parseFloat(imgWindowCS.width),
5352-
};
5353-
53545353
this.center(rectSize.w <= wSize.w , rectSize.h <= wSize.h);
53555354
};
53565355

0 commit comments

Comments
 (0)