diff --git a/FAQ.md b/FAQ.md
index 8e1654e..8d841b0 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -283,11 +283,16 @@ sortOrderOfFiles则设定排序方式,asc顺序,desc倒序。
## 怎么用键盘控制浏览图片以及自动播放?
从v0.4.4版本开始,PC下支持键盘控制,以下是快捷键:
-* 上下左右方向键控制焦点元素
-* Enter回车键进入对应目录,或者开始浏览图片
-* p - 在图片浏览模式下按p键开始自动播放
-* s - 在自动播放情况下按s键停止自动播放
-* Esc退出键,退出图片浏览
+| 快捷键 | 功能 |
+| 上下左右方向键 | 控制元素焦点 |
+| Enter回车键 | 进入对应目录,或者开始浏览图片 |
+| p | 开始自动播放 |
+| s | 停止自动播放 |
+| + | 放大图片 |
+| - | 缩小图片 |
+| o | 查看1比1原图 |
+| f | 切换全屏模式 |
+| Esc退出键 | 退出图片浏览 |
## 相册部署到外网了,点击图片打开有点慢怎么办?
diff --git a/themes/beauty/views/list/bydate.php b/themes/beauty/views/list/bydate.php
index 075c7cc..46dce61 100644
--- a/themes/beauty/views/list/bydate.php
+++ b/themes/beauty/views/list/bydate.php
@@ -467,5 +467,5 @@ if ($total > $viewData['pageSize']) {
\ No newline at end of file
diff --git a/themes/beauty/views/site/index.php b/themes/beauty/views/site/index.php
index fce6a6c..9030a44 100644
--- a/themes/beauty/views/site/index.php
+++ b/themes/beauty/views/site/index.php
@@ -573,5 +573,5 @@ if ($total > $viewData['pageSize']) {
\ No newline at end of file
diff --git a/www/js/beauty.js b/www/js/beauty.js
index c9389d0..829efe0 100644
--- a/www/js/beauty.js
+++ b/www/js/beauty.js
@@ -1002,6 +1002,10 @@ var RC_LEFT = 37;
RC_PLAY_PC = 80, //Key p
RC_STOP_PC = 83, //Key s
+ RC_FULL_PC = 70, //Key f
+ RC_ZOOM_OUT_PC = 187, //Key +
+ RC_ZOOM_IN_PC = 189, //key -
+ RC_ZOOM_1v1_PC = 79, //key o
//tv only
RC_PLAY = 415,
@@ -1125,10 +1129,10 @@ var keyPress = function(way) {
if (next) {
next.focus();
}else {
- console.warn('No next sibling');
+ //console.warn('No next sibling');
}
}else {
- console.warn('No focused element');
+ //console.warn('No focused element');
}
};
@@ -1137,15 +1141,19 @@ $(document.body).on('keydown', function(e) {
//console.log('Key pressed', e.keyCode);
if (e.keyCode == RC_RIGHT) {
+ e.preventDefault();
keyPress('right');
}else if (e.keyCode == RC_LEFT) {
+ e.preventDefault();
keyPress('left');
}else if (e.keyCode == RC_UP) {
+ e.preventDefault();
keyPress('up');
}else if (e.keyCode == RC_DOWN) {
+ e.preventDefault();
keyPress('down');
}else if (e.keyCode == RC_PLAY || e.keyCode == RC_PLAY_PC) {
- //play images
+ //autoplay images
var fancybox = Fancybox.getInstance();
if (fancybox) {
var autoplay = fancybox.plugins.Slideshow.ref;
@@ -1163,5 +1171,25 @@ $(document.body).on('keydown', function(e) {
fancybox.close();
}
}
+ }else if (e.keyCode == RC_FULL_PC) {
+ var fancybox = Fancybox.getInstance();
+ if (fancybox) {
+ fancybox.toggleFullscreen();
+ }
+ }else if (e.keyCode == RC_ZOOM_OUT_PC) {
+ var fancybox = Fancybox.getInstance();
+ if (fancybox) {
+ fancybox.getSlide().panzoom.zoomIn();
+ }
+ }else if (e.keyCode == RC_ZOOM_IN_PC) {
+ var fancybox = Fancybox.getInstance();
+ if (fancybox) {
+ fancybox.getSlide().panzoom.zoomOut();
+ }
+ }else if (e.keyCode == RC_ZOOM_1v1_PC) {
+ var fancybox = Fancybox.getInstance();
+ if (fancybox) {
+ $('.btn-original-1v1').click();
+ }
}
});
\ No newline at end of file