|
6 | 6 | // @description Powerful picture viewing tool online, which can popup/scale/rotate/batch save pictures or find the HD original picture automatically |
7 | 7 | // @description:zh-CN NLF 的围观图修改版,增加高清原图查找显示(在线看图工具,支持图片翻转、旋转、缩放、弹出大图、批量保存、查找原图) |
8 | 8 | // @description:zh-TW NLF 的圍觀圖修改版,增加高清原圖查詢顯示(線上看圖工具,支援圖片翻轉、旋轉、縮放、彈出大圖、批量儲存、查詢原圖) |
9 | | -// @version 2017.1.13.1 |
| 9 | +// @version 2017.1.19.1 |
10 | 10 | // @created 2011-6-15 |
11 | 11 | // @namespace http://userscripts.org/users/NLF |
12 | 12 | // @homepage http://hoothin.com |
|
41 | 41 | // 默认设置,请到设置界面修改 |
42 | 42 | var prefs={ |
43 | 43 | floatBar:{//浮动工具栏相关设置. |
44 | | - butonOrder:['actual','current','magnifier','gallery','search'],//按钮排列顺序'actual'(实际的图片),'current'(当前显示的图片),'magnifier'(放大镜观察),'gallery'(图集) |
| 44 | + butonOrder:['actual','gallery','magnifier','current','search'],//按钮排列顺序'actual'(实际的图片),'current'(当前显示的图片),'magnifier'(放大镜观察),'gallery'(图集) |
45 | 45 | showDelay:366,//浮动工具栏显示延时.单位(毫秒) |
46 | 46 | hideDelay:566,//浮动工具栏隐藏延时.单位(毫秒) |
47 | 47 | position:'top left',// 取值为: 'top left'(图片左上角) 或者 'top right'(图片右上角) 'bottom right'(图片右下角) 'bottom left'(图片左下角); |
@@ -3006,7 +3006,7 @@ padding-left:24px;">'+shareItem.name+'</span>'); |
3006 | 3006 |
|
3007 | 3007 | var scaled='100%'; |
3008 | 3008 |
|
3009 | | - if(this.fitContains){//适应屏幕 |
| 3009 | + if(this.fitContains && !(scale && scale.x==0 && scale.y==0 && this.imgNaturalSize.h/this.imgNaturalSize.w > 2.5)){//适应屏幕 |
3010 | 3010 | this.imgScrollbarV.hide(); |
3011 | 3011 | this.imgScrollbarH.hide(); |
3012 | 3012 | if(larger){ |
@@ -5357,22 +5357,23 @@ background-color:rgba(255, 0, 0, 0.150);\ |
5357 | 5357 | imgWindow.style.left=-5 + scrolled.x + 'px'; |
5358 | 5358 | imgWindow.style.top=-5 + scrolled.y + 'px'; |
5359 | 5359 |
|
5360 | | - //window的尺寸 |
5361 | | - var wSize=getWindowSize(); |
5362 | | - //空隙 |
5363 | | - wSize.h -= 16; |
5364 | | - wSize.w -= 16; |
5365 | | - |
5366 | | - var imgWindowCS=unsafeWindow.getComputedStyle(imgWindow); |
5367 | | - |
5368 | | - var rectSize={ |
5369 | | - h:parseFloat(imgWindowCS.height), |
5370 | | - w:parseFloat(imgWindowCS.width), |
5371 | | - }; |
5372 | | - if(prefs.imgWindow.fitToScreen && !(rectSize.h/rectSize.w > 2.5 && rectSize.h > wSize.h)){ |
| 5360 | + if(prefs.imgWindow.fitToScreen){ |
5373 | 5361 | this.fitToScreen(); |
5374 | 5362 | this.center(true,true); |
5375 | 5363 | }else{ |
| 5364 | + //window的尺寸 |
| 5365 | + var wSize=getWindowSize(); |
| 5366 | + //空隙 |
| 5367 | + wSize.h -= 16; |
| 5368 | + wSize.w -= 16; |
| 5369 | + |
| 5370 | + var imgWindowCS=unsafeWindow.getComputedStyle(imgWindow); |
| 5371 | + |
| 5372 | + var rectSize={ |
| 5373 | + h:parseFloat(imgWindowCS.height), |
| 5374 | + w:parseFloat(imgWindowCS.width), |
| 5375 | + }; |
| 5376 | + |
5376 | 5377 | this.center(rectSize.w <= wSize.w , rectSize.h <= wSize.h); |
5377 | 5378 | }; |
5378 | 5379 |
|
|
0 commit comments